1

I'm trying to get the login_hint to work when using OAuth, but it seems like SFDC is encoding it during the redirect to the login page in a way that it isn't recognized

Here is my url scrubbed of any sensitive info

https://login.salesforce.com/services/oauth2/authorize?client_id=zzz&client_secret=zzz&login_hint=username%40salesforce.com&grant_type=authorization_code&prompt=login+consent&redirect_uri=https%3A%2F%2Fendpoint.com%2Foauth2&response_type=code

Which salesforce redirects to

https://login.salesforce.com/?startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DSOME_LONG_HASH%26login_hint%3Dusername%2540salesforce.com&sdtd=1

Which doesn't populate the login hint.

If I change the url to

https://login.salesforce.com/?startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DSOME_LONG_HASH&login_hint=username%40salesforce.com&sdtd=1

It works as expected.

Is this a bug on the SFDC side, or am I encoding the login_hint incorrectly?

0

After filing a case with SFDC, it turns out that this is a bug. Here is the known issue https://success.salesforce.com/issues_view?id=a1p30000000eQYKAA2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.