Overview
This article will describe how to use the login_hint parameter in an /authorize request with email addresses with +
signs.
- Passing a login_hint parameter to the New Universal Login will populate the email field.
- Example:
https://YOUR_DOMAIN/authorize?client_id=CLIENT_ID&response_type=code&scope=openid+profile+email&redirect_uri=REDIRECT_URI&screen_hint=login&login_hint=abcdef@test.com
- This will result in the email field being pre-populated with abcdef@test.com.
- Example:
For a variety of reasons, some users have +
in their email addresses. However, passing an email like abc+def@test.com with login_hint will not pre-populate the email field correctly. It will show a space in place of the +
: abc def@test.com.
Applies To
- New Universal Login
Solution
To successfully pre-populate the email field with email addresses with +
in them, URL encode the +
. The URL-encoded value of a +
is %2B
. The /authorize request for an email with a +
(abc+def@test.com) will look something like this:
https://YOUR_DOMAIN/authorize?client_id=CLIENT_ID&response_type=code&scope=openid+profile+email&redirect_uri=REDIRECT_URI&screen_hint=login&login_hint=abc%2Bdef@test.com
The email field will be populated with abc+def@test**.**com as desired.