How to enable SSO login from ios native app to a webview

Hi, I have an ios app that opens a webview using auth0-spa-js and would like to enable auto login on that webview.

read an old post wanting to achieve the same How to do SSO between iOS app and React SPA in same organization? - #2 by Abhishek_Hingnikar1
but I still can’t understand what’s the actionable in the context of ios and the webview.

  1. The user arrives to your app. Your app sees no session and initiates login using the WebAuth method in the iOS / Swift SDK. At this point your application will get a refresh_token which the app use to keep the user logged in.

Ok, i can get the refresh_token, what should I do with it?

  1. The user then goes to the webview say https://foo.com/ at this point foo.com will notice that there is no session that it has for the user, therefore it will redirect to Auth0 with prompt=none optimistically (using the renewAuth method in Auth0.js).

Is this done on the web application side or the webview url? Need more info on this please :grinning:

Thank you in advanced!

SDK: pod ‘Auth0’, ‘~> 1.13’, auth0-spa-js v1.15.0
Platform: ios 14.5

1.In the management dashboard, click Apps/APIs.
2.Click the application that you want to enable Single Sign on.
3.In the Settings tab, scroll down until you see the Use Auth0 instead of the IdP to do Single Sign On switch.

Hi @igorf7027 , is there anything i should add on my iOS & web app?

I’m also interested in hearing about this solution. Did you get any further with it @vinamelody ?
@igorf7027 any update?