Skip to content

Commit d60c116

Browse files
poovamrajWidcket
andauthored
Update README.md to add content on TWA (#682)
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
1 parent d052d47 commit d60c116

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,36 @@ The callback will get invoked when the user returns to your application. There a
288288

289289
If the `returnTo` URL is not found in the **Allowed Logout URLs** of your Auth0 Application, the server will not make the redirection and the browser will remain open.
290290

291+
### Trusted Web Activity (Experimental Release)
292+
293+
> **⚠️ Warning:** Trusted Web Activity support in Auth0.Android is still experimental and can change in the future.
294+
>
295+
> Please test it thoroughly in all the targeted browsers and OS variants and let us know your feedback.
296+
297+
Trusted Web Activity is a feature provided by some browsers to provide a native look and feel.
298+
299+
<p align="center">
300+
<img width="500" alt="Trusted Web Activity" src="https://github.com/auth0/Auth0.Android/assets/15910425/0be50959-e7e9-4a41-a99c-4c4c377e1faa">
301+
</p>
302+
303+
To use this feature, there are some additional steps you must take:
304+
305+
- We need the SHA256 fingerprints of the app’s signing certificate. To get this, you can run the following command on your APK:
306+
```shell
307+
keytool -printcert -jarfile sample-debug.apk
308+
```
309+
- The fingerprint has to be updated in the [Auth0 Dashboard](https://manage.auth0.com/dashboard/eu/poovamraj/applications) under
310+
Applications > *Specific Application* > Settings > Advanced Settings > Device Settings > Key Hashes
311+
- The app's package name has to be entered in the field above
312+
313+
Once the above prerequisites are met, you can call your login method as shown below to open your web authentication in Trusted Web Activity.
314+
315+
```kotlin
316+
WebAuthProvider.login(account)
317+
.withTrustedWebActivity()
318+
.await(this)
319+
```
320+
291321
## Credentials Manager
292322

293323
This library ships with two additional classes that help you manage the Credentials received during authentication.

0 commit comments

Comments
 (0)