Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Pass username for bypassing the Okta hosted page and redirect to Microsoft login. #904

Open
muditjuneja opened this issue Sep 10, 2020 · 1 comment

Comments

@muditjuneja
Copy link

I am trying to pass a param called "username" to the config to avoid having an Okta hosted login screen when I initiate the authorize request. What I want is for a user to be redirected to the Microsoft login screen after I initiate the login request. I wish to bypass Okta screen where user have to enter their email id and then he redirects to the Microsoft login page.

I'm submitting this issue for the package(s):

  • [-] okta-react

I'm submitting a:

  • [-] Bug report

Current behavior

I am initiating the login request like this :
authService.login('/app/okta-log-in');
Where okta-log-in is my custom component where I am handling the authentication via token/idToken

Expected behavior

What I want is something like this :
authService.login('/app/okta-log-in', { 'username': '[email protected]' });

But this does not add any username param in my okta redirect link.

But if I try like this :
authService.login('/app/okta-log-in&[email protected]');
What happens is that it adds the param to the final URL but it just URL encodes the entire string and replace =/@ with %3D/%40 and the okta login page appears because it could not parse the username param.

If I manually add the username param in the URL, I don't see the Okta screen and it just takes me to the Microsoft login page.

@aarongranick-okta
Copy link
Contributor

@muditjuneja It sounds like you are trying to login using Microsoft as an IDP provider. This guide may be able to help you set it up: https://developer.okta.com/docs/guides/add-an-external-idp/microsoft/before-you-begin/
You will need to pass the IDP provider ID as an option as described here: https://github.com/okta/okta-auth-js#token

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants