# Single Sign-on on mobile devices

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. **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. **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`.

{% tabs %}
{% tab title="React Native" %}

```typescript
authgear.configure({
    clientID: CLIENT_ID,
    endpoint: ENDPOINT,
    shareSessionWithSystemBrowser: true,
});
```

{% endtab %}

{% tab title="iOS" %}

```swift
Authgear(
    clientId: CLIENT_ID,
    endpoint: ENDPOINT,
    shareSessionWithSystemBrowser: true,
)
```

{% endtab %}

{% tab title="Android" %}

```kotlin
new Authgear(
    application,
    CLIENT_ID,
    ENDPOINT,
    null, // tokenStorage = default
    true // shareSessionWithSystemBrowser = true
);
```

{% endtab %}
{% endtabs %}
