You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@lakhansamani ,I am trying to make sense of the magic link flow. When a user clicks on the link in their email , what happens next ? what authorizer function do we call on our application to verify the incoming link ? Does it have a token attached? are we supposed to call verifyEmail and pass a token parameters from the URl like we do in the SIgn up Flow ? There is no where in the documentation (or any of the youtube videos) explaining this bit
You can set the redirect URL by either passing it to the magic_link login param or by setting the APP_URL param. If none of the above is present, it will redirect to authorizer universal login page (/app route of authorizer).
@lakhansamani I am back at this . The redirect URl i get only has querystring parameter "roles" and nothing more. How do i get the user's auth data as expected to redirect them as logged in users
// GetEmailVerificationURL to get url for invite email verification
func GetEmailVerificationURL(token, hostname, redirectURI string) string {
return hostname + "/verify_email?token=" + token + "&redirect_uri=" + redirectURI
}
redirect Url should also get the token passed as query string to enable a call to getprofile (i am assuming the token is access token) for e.g to pull the current user's credential and also mark them as logged in
The method await authClient.magicLinkLogin({ email: formData.email, redirect_uri: MAGIC_LINK_CALLBACK_URL }) gets called
User receives email with login link
User clicks the link which routes to the autorizer backend for verification
user is redirected via redirect URL to the calling application
Redirect URL does not contain any infomation of the validated User (only Roles) .
No way to tell which user is validated to log in
Ideal should be from 4 above
5. User is redirected via the redirect URL to the calling application with the id and access tokens appended to the query string
6. Using the ID token , calling application can call authClient.GetProfile() to get the logged in User's detail and routes them to the app
right now the redirectUrl being behind an auth wall just send the user back to the login screen .
Activity
lakhansamani commentedon Oct 21, 2023
@shiftlabs1 when magic link login flow is used.
An email is shoot to user with following link
You can set the redirect URL by either passing it to the magic_link login param or by setting the
APP_URLparam. If none of the above is present, it will redirect to authorizer universal login page (/app route of authorizer).shiftlabs1 commentedon Oct 23, 2023
thanks @lakhansamani . None of this in the docs .Would need adding .
lakhansamani commentedon Oct 24, 2023
True,
I will add it soon 👍
shiftlabs1 commentedon Dec 6, 2023
@lakhansamani I am back at this . The redirect URl i get only has querystring parameter "roles" and nothing more. How do i get the user's auth data as expected to redirect them as logged in users
shiftlabs1 commentedon Dec 6, 2023
I got this for e.g
shiftlabs1 commentedon Dec 6, 2023
Looking at the code
redirect Url should also get the token passed as query string to enable a call to getprofile (i am assuming the token is access token) for e.g to pull the current user's credential and also mark them as logged in
shiftlabs1 commentedon Dec 8, 2023
@lakhansamani please take a look at this and let me know how to proceed.
lakhansamani commentedon Dec 8, 2023
@shiftlabs1 I am quite not getting the flow here,
Can you write down the flow once and reproducible steps
Thanks
shiftlabs1 commentedon Dec 8, 2023
The current flow is
await authClient.magicLinkLogin({ email: formData.email, redirect_uri: MAGIC_LINK_CALLBACK_URL })gets calledIdeal should be from 4 above
5. User is redirected via the redirect URL to the calling application with the id and access tokens appended to the query string
6. Using the ID token , calling application can call authClient.GetProfile() to get the logged in User's detail and routes them to the app
right now the redirectUrl being behind an auth wall just send the user back to the login screen .
shiftlabs1 commentedon Dec 8, 2023
@lakhansamani , I should be able to do this from the redirect URL

lakhansamani commentedon Dec 8, 2023
Thank you for sharing the reproducible steps,
I will look into this
fix(magic-link): bind the authorize request to the initiating browser…
fix(magic-link): widen redirect validation only for the bound browser…
fix(magic-link): make /verify_email codes redeemable and links surviv…
fix(magic-link): bind the authorize request to the initiating browser…
fix(magic-link): widen redirect validation only for the bound browser…
fix(magic-link): make /verify_email codes redeemable and links surviv…
docs: Postgres schema via search_path, magic link flow, root-less Doc…