<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z0000A19CBhCQMOkta Classic EngineSingle Sign-OnAnswered2025-09-13T09:01:51.000Z2024-02-28T15:19:54.000Z2024-02-28T23:14:44.000Z

pg0fr (pg0fr) asked a question.

How to get the original email entered when using identity provider?

Imagine I've got a Google IdP that my user is authenticating with. My basic process with Okta goes thus:

 

  1. User enters their email, using a plus address (e.g. "example+login@gmail.com")
  2. We get Okta's login url using /v1/authorize (with response_type = "code")
  3. We redirect to Okta's login url, which redirects to Google, and the user authenticates with them.
  4. Okta sends us a callback with a token

 

The issue is that the token doesn't have the plus addressing in it - now it's "example@gmail.com". This confuses our system a bit because we're expecting to get back the same email as was originally entered - when we later try to query Okta for the user, we use "example+login@gmail.com" and the user can't be found (because it was federated as "example@gmail.com").

 

Is there a way to get back the original login email with the token? Or some better way to associate one user with multiple possible emails?


Loading
How to get the original email entered when using identity provider?