How I can open Okta login in Mobile app itself only instead of open in InAppBroser?

Hi Folks,
Greetings!

I have implemented SSO login using Okta.
But here issue is Okta login page is opening in browser popup, so I would like to open that login page into mobile app itself only.

Kindly help to resolve this issue.

Thanks

Hi Meer,

Did you see this component? https://www.outsystems.com/forge/component-overview/2044/idp-mobile

"Tested with Okta, Azure, ADFS, PingOne and OneLogin"


But, without using InAppBrowser, I think you should choose another solution, like this: https://github.com/okta/okta-auth-js


Regards

Pedro Costa wrote:

Hi Meer,

Did you see this component? https://www.outsystems.com/forge/component-overview/2044/idp-mobile

"Tested with Okta, Azure, ADFS, PingOne and OneLogin"


But, without using InAppBrowser, I think you should choose another solution, like this: https://github.com/okta/okta-auth-js


Regards

Hi Pedro Costa,
Thanks for reply.

Yes, I am using IdPMobile component and it is working, but issue is to open login page into application only instead of browser (because browser can cancelled by user and app is opened in background as it is).

Actually we have implemented SSO login using IdP for web so using same IdP we would like to implement for  mobile app login.

If you have another solution regardless of APIs so kindly let me know. Meanwhile I will try using javaScript APIs.

Thanks

 


Right, I believe JS is the right way.


I'll let you know if I find another solution.

Pedro Costa wrote:

Right, I believe JS is the right way.


I'll let you know if I find another solution.

Hi Pedro Costa,
Greetings!

I am trying using JS, but always getting following error

"Module name "@okta/okta-auth-js" has not been loaded yet for context: _. Use require([])"


Above error is firing on the first line that is "var OktaAuth = require('@okta/okta-auth-js'); "

I have configured Okta application details in config declaration too.


Kindly let me know how to apply require('@okta/okta-auth-js') statement.

Hi Meer,


I think you can remove this line of code from your script, and use the System / RequireScript action inside the client action that will execute the command you want.



Regards

Pedro Costa wrote:

Hi Meer,


I think you can remove this line of code from your script, and use the System / RequireScript action inside the client action that will execute the command you want.



Regards

I have same set up in my client action even getting same error i.e. "Error: Module name "@okta/okta-auth-js" has not been loaded yet for context: _. Use require([])" and  "TypeError: OktaAuth is not a constructor"




Solution

Hi Meer,

I don't understand much about Okta, but here I made an example using JS to instantiate OktaAuth.

See the attachment and see this link https://developer.okta.com/code/javascript/okta_auth_sdk/

Don't forget to look at the result in your browser console.

Can you move forward from here?

Regards

Solution

Pedro Costa wrote:

Hi Meer,

I don't understand much about Okta, but here I made an example using JS to instantiate OktaAuth.

See the attachment and see this link https://developer.okta.com/code/javascript/okta_auth_sdk/

Don't forget to look at the result in your browser console.

Can you move forward from here?

Regards

Thanks Pedro Costa, JavaScript Run perfectly now.

Appreciate your support..(Y)

I will go ahead for Login API.