Skip to content

Commit

Permalink
Added docs on session management in Unity (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
BellringerQuinn authored Sep 9, 2024
1 parent 34fedd1 commit 9448c17
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Binary file modified docs/.DS_Store
Binary file not shown.
27 changes: 27 additions & 0 deletions docs/pages/sdk/unity/session-management.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Session management

Once you've authenticated your user with the Sequence APIs and established a session, there are a number of methods available to you to manage the session.

## List Sessions

Use the `ListSessions` method to find all active sessions associated with this user/wallet.

## Drop Session

If you wish to drop/end a session, you can use the `DropSession` method and provide the session id you wish to drop.

## Drop This Session

The `DropThisSession` method can be use if you wish to drop/end the current session. In other words, if you wish to log the user out.

:::note
If you are using the default `LoginPanel` and you have not enabled `StoreSessionPrivateKeyInSecureStorage` or are on an unsupported platform (see [Recovering Sessions](/sdk/unity/recovering-sessions)), the `WaaSSessionManager` prefab attached to the `LoginPanel` will automatically call this method `OnApplicationQuit`
:::

## Get Account List

If you wish to fetch the `Account`s associated with the user's wallet, you can use the `GetAccountList` method.

## Get Id Token

If you wish to retrieve an id token JWT from the Sequence APIs to validate the authentication on your backend, you can use the `GetIdToken` method and optionally provide a nonce.
1 change: 1 addition & 0 deletions nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ export const sidebar = {
{ text: 'Read from Blockchain', link: '/sdk/unity/read-from-blockchain' },
{ text: 'Sign Messages', link: '/sdk/unity/sign-messages' },
{ text: 'Recovering Sessions', link: '/sdk/unity/recovering-sessions' },
{ text: 'Session Management', link: '/sdk/unity/session-management' },
{ text: 'On-Ramp Funds via Credit Card', link: '/sdk/unity/onboard-user-funds' },
{ text: 'Marketplace', link: '/sdk/unity/marketplace' },
{
Expand Down

0 comments on commit 9448c17

Please sign in to comment.