Skip to content

Commit 46fda48

Browse files
authored
Update EXAMPLES.md
Added authoriseurl and logouturl details.
1 parent ad7f5ba commit 46fda48

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

EXAMPLES.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
- [Specify scope](#specify-scope)
77
- [Specify Connection scope](#specify-connection-scope)
88
- [Specify Parameter](#specify-parameter)
9+
- [Specify a Custom Authorize URL](#specify-a-custom-authorize-url)
910
- [Customize the Custom Tabs UI](#customize-the-custom-tabs-ui)
1011
- [Changing the Return To URL scheme](#changing-the-return-to-url-scheme)
12+
- [Specify a Custom Logout URL](#specify-a-custom-logout-url)
1113
- [Trusted Web Activity](#trusted-web-activity)
1214
- [Authentication API](#authentication-api)
1315
- [Login with database connection](#login-with-database-connection)
@@ -95,6 +97,28 @@ WebAuthProvider.login(account)
9597
.start(this, callback)
9698
```
9799

100+
## Specify a Custom Authorize URL
101+
102+
In scenarios where you need to use a specific authorize endpoint different from the one derived from your Auth0 domain (e.g., for custom domains, specific tenant configurations), you can provide a full custom URL to the `/authorize` endpoint.
103+
104+
```kotlin
105+
WebAuthProvider.login(account)
106+
.withAuthorizeUrl("https://YOUR_CUSTOM_TENANT_OR_AUTH_DOMAIN/authorize")
107+
.start(this, callback)
108+
```
109+
110+
<details>
111+
<summary>Using Java</summary>
112+
113+
```java
114+
WebAuthProvider.login(account)
115+
.withAuthorizeUrl("https://YOUR_CUSTOM_TENANT_OR_AUTH_DOMAIN/authorize")
116+
.start(this, callback);
117+
```
118+
</details>
119+
120+
The URL provided to `.withAuthorizeUrl()` must be a complete and valid HTTPS URL for an OAuth 2.0 authorize endpoint. The SDK will append standard OAuth parameters to this custom base URL.
121+
98122
## Customize the Custom Tabs UI
99123

100124
If the device where the app is running has a Custom Tabs compatible Browser, a Custom Tab will be preferred for the logout flow. You can customize the Page Title visibility, the Toolbar color, and the supported Browser applications by using the `CustomTabsOptions` class.
@@ -134,6 +158,27 @@ WebAuthProvider.logout(account)
134158
.start(this, logoutCallback)
135159
```
136160

161+
## Specify a Custom Logout URL
162+
163+
Similar to the authorize URL, you can specify a custom logout endpoint if your setup requires it (e.g., using custom domains or for specific logout behaviors configured in your Auth0 tenant).
164+
165+
```kotlin
166+
WebAuthProvider.logout(account)
167+
.withLogoutUrl("https://YOUR_CUSTOM_TENANT_OR_AUTH_DOMAIN/v2/logout")
168+
.start(this, logoutCallback)
169+
```
170+
<details>
171+
<summary>Using Java</summary>
172+
173+
```java
174+
WebAuthProvider.logout(account)
175+
.withLogoutUrl("https://YOUR_CUSTOM_TENANT_OR_AUTH_DOMAIN/v2/logout")
176+
.start(this, logoutCallback);
177+
```
178+
</details>
179+
180+
The URL provided to `.withLogoutUrl()` must be a complete and valid HTTPS URL for logout endpoint. The SDK will append standard logout parameters to this custom base URL.
181+
137182
## Trusted Web Activity
138183

139184
Trusted Web Activity is a feature provided by some browsers to provide a native look and feel to the custom tabs.
@@ -1515,4 +1560,4 @@ The rules should be applied automatically if your application is using `minifyEn
15151560
By default you should at least use the following files:
15161561
* `proguard-okio.pro`
15171562
* `proguard-gson.pro`
1518-
* `proguard-jetpack.pro`
1563+
* `proguard-jetpack.pro`

0 commit comments

Comments
 (0)