magic-link | Generate , send and validate a magic link | Proxy library

 by   lucasmontano Python Version: Current License: MIT

kandi X-RAY | magic-link Summary

kandi X-RAY | magic-link Summary

magic-link is a Python library typically used in Networking, Proxy, Nodejs applications. magic-link has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

This is the second edition of #umaStackQueNaoDomino. Python Edition. The project offer API to generate, send and validate a magic link.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              magic-link has a low active ecosystem.
              It has 91 star(s) with 15 fork(s). There are 12 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 4 open issues and 8 have been closed. On average issues are closed in 5 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of magic-link is current.

            kandi-Quality Quality

              magic-link has 0 bugs and 0 code smells.

            kandi-Security Security

              magic-link has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              magic-link code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              magic-link is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              magic-link releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              magic-link saves you 22 person hours of effort in developing the same functionality from scratch.
              It has 62 lines of code, 3 functions and 1 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed magic-link and discovered the below as its top functions. This is intended to give you an instant insight into magic-link implemented functionality, and help decide if they suit your requirements.
            • Verify the JWT signature .
            • Validate a JWT token .
            • Enqueue a magic link .
            Get all kandi verified functions for this library.

            magic-link Key Features

            No Key Features are available at this moment for magic-link.

            magic-link Examples and Code Snippets

            No Code Snippets are available at this moment for magic-link.

            Community Discussions

            QUESTION

            id_token_hint parameter failed signature validation when Using B2C to generate the metadata endpoints
            Asked 2021-Nov-09 at 16:25

            I am attempting to set up a Magic link like system using Azure B2C. Using the following samples: Primary:
            https://github.com/azure-ad-b2c/samples/tree/master/policies/sign-in-with-magic-link

            For sing B2C to generate the metadata endpoints: https://github.com/azure-ad-b2c/samples/tree/master/policies/invite#using-b2c-to-generate-the-metadata-endpoints

            As a note I believe I had it working at one point but after a clean up I have been getting the error:

            The provided id_token_hint parameter failed signature validation. Please provide another token and try again.

            The steps I took to set up is as follows:

            1. Create a cert via powershell and get thumbprint to use in local code
            2. Use certmng via MMC to export cert
              • All Task / Export / Next / Yes, Export the private key
              • Personal Information Exchange - PKCS (Include all cert in cert path)(Enable cert privacy)
            3. Security (Password) Randomly Generated Pass 25 character password.
            4. Name: id_token_hint_cert.pfx
            5. Browse Azure / B2C / Identity Experience Framework / Policy keys
              • Add / Option: Upload / Name: IdTokenHintCert / File Upload id_token_hint_cert.pfx / Password: Password from setup 3

            This is where I have tried 2 different set ups. The first was to setup a set of custom policies so that I could update the following claims provider to have issuer_secret set to B2C_1A_IdTokenHintCert

            ...

            ANSWER

            Answered 2021-Nov-09 at 16:25

            Location Location Location.

            I was adjusting the base profile which I learned I should not be doing. When I applied my change to the extension file instead everything starting working properly.

            Source https://stackoverflow.com/questions/69715650

            QUESTION

            Generating a magic login link with Azure B2C as the authority
            Asked 2020-Mar-24 at 13:10

            I'm looking for a method to log in a user using a link sent by mail. The Sign-in with a magic link sample policy comes very close to what I want to achieve.

            My main issue with this sample is that it requires the web app to set up a certificate and host an OIDC endpoint. So the web app becomes the source of trust. What even is the point of B2C if it's not generating or validating the tokens? It seems like I'm adding an extra attack surface on our application. One of the reasons we use B2C is so we don't have to deal with the dangers of authenication. Or am I seeing this wrong?

            Another option I was looking at is the OAuth 2.0 On-Behalf-Of flow. That does use B2C as the source of trust but is not intended to create user tokens. It's for authenticating one app with the parent app. Would it be a bad idea to try to use such an OBO access token to authenticate a user instead?

            ...

            ANSWER

            Answered 2020-Mar-24 at 13:10

            Your solution is in the link you posted. You can give the certificate to B2C and we can host that metadata.

            https://github.com/azure-ad-b2c/samples/tree/master/policies/invite#using-b2c-to-generate-the-metadata-endpoints

            To note, when using id_token_hint, you are the IDP and giving Azure AD B2C the hint. Hence you need to have a metadata endpoint. B2C can host it for you if you use the above link, but you are sharing with us the Private Key, and you may not want to do that since as an IdP you dont share your private keys.....

            Source https://stackoverflow.com/questions/60826495

            QUESTION

            Azure B2C (IEF/Custom Policy) - State parameter
            Asked 2020-Feb-12 at 15:58

            I have the following flow for sign in / sign up, when using sign-up:

            1. Present user with sign up screen, allow them to enter email/password/name
            2. Validate input, then send email (rest api) and set verification attributes in b2c custom extension properties

            User then receives email with verification link

            1. User clicks link from email and gets sent to a new user journey for the return trip
            2. New user journey gets parameters from the querystring (email + verif code)
            3. B2C validates the verif code + expiry
            4. IF user is verified, they're set as verified via custom extension attributes, then sent to the (ASP.NET MVC) application.
            5. Here's where I'm stuck - B2C is sending the jwt token back to the app, but the user doesn't get 'signed-in'.

            Am I missing something at step 7? I don't have the "state" variable in my querystring, am I expected to build and include it somehow so that B2C and the app can communicate? I'm lost at this point. I'd post some of the b2c policy xml but not sure what would even help...

            EDIT: reply to Jas:

            Is that the only way (make an app call b2c for an auth request)? We have multiple apps that a user can use to sign up through b2c, so I was hoping to avoid having to make changes to each of them. Instead I was hoping that B2C could tell the app after account verification that "this user is ok".

            I did previous look at https://github.com/azure-ad-b2c/samples/tree/master/policies/sign-in-with-magic-link (written by you!), but again, was hoping I could avoid having to do that work inside of each of our apps.

            Here's an example of the jwt 'id_token' I'm trying to pass to the app:

            id_token

            Side note: Is 'id_token' the same as 'id_token_hint'? I couldn't find whether they're the same or different when googling it.

            ...

            ANSWER

            Answered 2020-Feb-11 at 21:42

            What you need to do is send the invite link in the email as a link to the app, eg https://myapp.com?id_token_hint=value. Then have your apps account controller make an auth request to the policy to complete the account redemption along with an extra query parameter “id_token_hint=value”. Now a proper auth can happen with your applications openId middleware initialised.

            Source https://stackoverflow.com/questions/60175863

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install magic-link

            You can download it from GitHub.
            You can use magic-link like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/lucasmontano/magic-link.git

          • CLI

            gh repo clone lucasmontano/magic-link

          • sshUrl

            git@github.com:lucasmontano/magic-link.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Proxy Libraries

            frp

            by fatedier

            shadowsocks-windows

            by shadowsocks

            v2ray-core

            by v2ray

            caddy

            by caddyserver

            XX-Net

            by XX-net

            Try Top Libraries by lucasmontano

            first-how-to-build-an-app

            by lucasmontanoKotlin

            openweathermap-reactnative

            by lucasmontanoJavaScript

            twitch

            by lucasmontanoTypeScript

            openweathermap

            by lucasmontanoKotlin