<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
0D50Z00008G7V0TSAVOkta Classic EngineIntegrationsAnswered2018-09-05T01:27:24.000Z2017-05-14T20:17:48.000Z2017-05-14T20:17:48.000Z
Getting Current User in Custom App
Hello, 

 

I am writing a custom app and am using the Okta API to pass some information to it. I need to know the best way to get the login for the currently logged in user. I'm utilizing a "Bookmark" app and link to redirect to a URL. The "Get Current User" call only returns me, since I set up the API key. I cannot figure out how to do "Get Current Session." 

 

Any help would be much appreciated. I am not that great at this so bear with me. Thanks.

  • Hello, my name is Costel from Okta support.

    The best place to start is using our primary auth API with a public application (that is setup with the API token generated from Okta).

    As described under "Primary Authentication with Public Application"

    You can get the Current user by using this API call that returns a session token at redirects the user to a defined URL.

     

    curl -v -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "username": "dade.murphy@example.com", "password": "correcthorsebatterystaple", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "options": { "multiOptionalFactorEnroll": false, "warnBeforePasswordExpired": false } }' "https://${org}.okta.com/api/v1/authn"

     

    Expand Post
This question is closed.
Loading
Getting Current User in Custom App