Single Sign-on on mobile devices
Provide a seamless user experience across multiple products with the single sign-on feature.
On mobile devices, Authgear uses a webview that can be configured to share the cookie with the system browser. The system browser is Safari on iOS, while the system browser is Chrome on Android. If you have both a mobile application and a website, you can enable the Single Sign-on feature so that
  1. 1.
    From Apps to Website: The end-user installs your app and signs in. Later on, when they visit your website with the system browser, they will be already signed in.
  2. 2.
    From Website to Apps: The end-user has been using your website. One day they decided to install your app. When they log in to the app, they will see a continue screen so that they can log in with just a click, without authenticating themselves again.
You can turn on this feature when you configure the SDK by setting the shareSessionWithSystemBrowser option to true.
React Native
Flutter
Xamarin
iOS
Android
1
authgear.configure({
2
clientID: CLIENT_ID,
3
endpoint: ENDPOINT,
4
shareSessionWithSystemBrowser: true,
5
});
Copied!
1
final authgear = Authgear(
2
clientID: CLIENT_ID,
3
endpoint: ENDPOINT,
4
shareSessionWithSystemBrowser: true,
5
);
Copied!
1
var authgearOptions = new AuthgearOptions
2
{
3
ClientId = CLIENT_ID,
4
AuthgearEndpoint = ENDPOINT,
5
ShareSessionWithSystemBrowser = true,
6
};
7
// Android
8
#if __ANDROID__
9
var authgear = new AuthgearSdk(GetActivity().ApplicationContext, authgearOptions);
10
#else
11
#if __IOS__
12
var authgear = new AuthgearSdk(UIKit.UIApplication.SharedApplication, authgearOptions);
13
#endif
14
#endif
Copied!
1
Authgear(
2
clientId: CLIENT_ID,
3
endpoint: ENDPOINT,
4
shareSessionWithSystemBrowser: true,
5
)
Copied!
1
new Authgear(
2
application,
3
CLIENT_ID,
4
ENDPOINT,
5
null, // tokenStorage = default
6
true // shareSessionWithSystemBrowser = true
7
);
Copied!
Copy link