Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Shrine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ server response from requesting passkey registration options. This is then used
in `AuthApiService.kt`, and the server's returned JSON is expected to have those fields. You can
verify this by looking at the logs in Logcat after making any server request.

### Restore Credentials

Restore Credentials are passkeys that are used to restore a user's app accounts when setting up a
new device. In Shrine, this is created in `AuthenticationScreen.kt` upon signing in successfully and
passing the `createRestoreKey()` function in to the View Model. This is also done in
Comment on lines +110 to +111

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The description of how a restore credential is created is a bit confusing and technically inaccurate. It says a function is passed to the View Model, but it's more accurate to say a View Model function is called. Also, "in to" should be "into", and using "a restore credential" instead of "this" would be clearer. I suggest rephrasing for better clarity and accuracy.

Suggested change
new device. In Shrine, this is created in `AuthenticationScreen.kt` upon signing in successfully and
passing the `createRestoreKey()` function in to the View Model. This is also done in
new device. In Shrine, a restore credential is created in `AuthenticationScreen.kt` upon successful
sign-in by calling the View Model's `createRestoreKey()` function. This is also done in

`RegisterPasswordScreen.kt`. When launching the app for the first time, Shrine checks for an
existing restore key by calling `viewModel.checkForStoredRestoreKey()` in `AuthenticationScreen.kt`.
If one exists, it uses that to log the user in automatically. You can read more about how Restore
Credentials work at https://developer.android.com/identity/sign-in/restore-credentials.

## Wear OS Module
This sample also includes a Wear OS module that implements Credential Manager for a Wear OS app.
See the wear/README.md file to learn about Wear OS behaviors and limitations.
Expand Down