achedeuzot / ueberauth_auth0

Auth0 OAuth2 strategy for Überauth.
https://hexdocs.pm/ueberauth_auth0
MIT License
71 stars 46 forks source link

"invitation" parameter passed on in request for supporting new user invite/registration from auth0 organizations #185

Closed milangupta1 closed 2 years ago

milangupta1 commented 3 years ago

Hi, On using the new universal login experience in Auth0, specifically, the new user registration confirmation, from the Auth0 docs (below), it appears that it requires calling the authentication endpoint with an "invitation" parameter. I have been trying to figure out how I can do that ? The ueberauth_auth0 strategy appears to intercept mask any input parameters ...

def login(conn, params) do conn |> redirect(to: Routes.auth_path(conn, :request, "auth0", params)) |> halt() end

any way of passing these on ? I suspect the masking is within this call .. def handle_request!(conn) do

-------------------- from Auth0 docs ---------------------------- Invite organization members When users are invited to join an Organization, they receive an invitation link by email. If they select the link, they are redirected to the configured default login route with invitation-specific parameters appended.

For example, if you have an organization-enabled application with an Application Login URI set to https://myapp.com/login, then the link sent in the email invitation that an end-user receives will be: https://myapp.com/login?invitation={invitation_ticket_id}&organization={organization_id}&organization_name={organization_name}.

Thus, the route in your application must accept invitation and organization parameters through the query string. To start the invitation acceptance transaction, it should forward both parameters along with the end-user to your Auth0 /authorize endpoint.

achedeuzot commented 2 years ago

This has been fixed in latest release #223