User Settings
Authgear provides a wide range of prebuilt frontend for the authentication related features of your apps

Actions in the settings page

The end-user can perform the following actions on the setting page:
  • Change their password.
  • Add or change their email, phone number or username.
  • Connect or disconnect to identity providers.
  • Manage the signed in sessions.
  • Enable or disable 2-step verification.
  • and many more.

Open the settings page directly in websites

In case your application is a website, the web SDK does not provide a method to open the settings page. However, you can construct the URL to the settings page as follows:
https://<your-app-endpoint>/settings
And then you can just set this as the href of your anchor tag
1
<div>
2
<a href="https://<your-app-endpoint>/settings">Open Settings Page</a>
3
</div>
Copied!

Open the settings page with the SDK in mobile apps

If you are working on a mobile apps, you can open the settings page using the SDK. When the end-user has signed in, the SDK provides a method to open the settings page in a webview.
React Native
Flutter
iOS
Android
1
import React, { useCallback } from "react";
2
import authgear, { Page } from "@authgear/react-native";
3
import { View, Button } from "react-native";
4
5
function SettingsScreen() {
6
const onPressOpenSettingsPage = useCallback(() => {
7
authgear.open(Page.Settings).then(() => {
8
// When the promise resolves, the webview have been closed.
9
});
10
}, []);
11
return (
12
<View>
13
<Button
14
title="Open Settings Page"
15
onPress={onPressOpenSettingsPage}
16
/>
17
</View>
18
);
19
}
Copied!
1
Future<void> onPressOpenSettingsPage() async {
2
await authgear.open(SettingsPage.settings);
3
}
Copied!
1
func onPressOpenSettingsPage(sender: UIButton, forEvent event: UIEvent) {
2
authgear.open(.settings) {
3
// When the completion handler is called, the webview is closed.
4
}
5
}
Copied!
1
public void onClickOpenSettingsPage() {
2
authgear.open(Page.Settings, null, new OnOpenURLListener() {
3
@Override
4
public void onClosed() {
5
// The webview is closed.
6
}
7
8
@Override
9
public void onFailed(Throwable throwable) {
10
// Some error occured.
11
}
12
});
13
}
Copied!

Back to my app button

In web-based application, you may want to add the "Back to my app" button to the settings page so the user can navigate back to your website after changing the settings.
  1. 1.
    Go to Portal > UI Settings
  2. 2.
    Provide the URL in Back to Your App Link and click Save