<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
0D51Y00006G84xgSABOkta Classic EngineAdministrationAnswered2019-09-17T16:06:45.000Z2019-05-19T19:18:39.000Z2019-05-29T00:36:50.000Z

JamesC.55432 (Customer) asked a question.

web app always logs in the same user

I'm using a free Okta developer account in order to make a sample app and test out Okta. I added a second user with a separate email address so I could test groups. I created a simple react app and used code from the react sample app and put in a call to /api/v1/users/me to get the current logged in users email address. I verified that I can log into okta.com using email account and it recognizes the two accounts as separate accounts. However whenever I log into the local react app (using the default hosted login page) it ends up logging me into the admin okta acount. I specify the 2nd userid & password but then when I call /users/me it returns the email address for the admin account. Any idea what I'm doing wrong? Is this just a limitation of the free developer account maybe?

 


  • JamesC.55432 (Customer)

    Thanks for following up Phoebe. I figured out how to solve this earlier this morning. I was previously calling an API method with /me to get current userid. I changed my code to use auth.getUser and then use the "sub" property off the return JSON and that made it happy.
    Selected as Best
  • Hi James, thanks for providing the details. We'll seeing if someone from our team can help out with this, but in the meantime, wondering if anyone else using Okta with a similar experience can chime in here?

    • JamesC.55432 (Customer)

      Thanks for following up Phoebe. I figured out how to solve this earlier this morning. I was previously calling an API method with /me to get current userid. I changed my code to use auth.getUser and then use the "sub" property off the return JSON and that made it happy.
      Selected as Best
This question is closed.
Loading
web app always logs in the same user