From 9448c17d132d198f8c1e5440a399bdac8da804dc Mon Sep 17 00:00:00 2001 From: Quinn Purdy <49766546+BellringerQuinn@users.noreply.github.com> Date: Mon, 9 Sep 2024 04:39:50 -0400 Subject: [PATCH] Added docs on session management in Unity (#281) --- docs/.DS_Store | Bin 6148 -> 8196 bytes docs/pages/sdk/unity/session-management.mdx | 27 ++++++++++++++++++++ nav.ts | 1 + 3 files changed, 28 insertions(+) create mode 100644 docs/pages/sdk/unity/session-management.mdx diff --git a/docs/.DS_Store b/docs/.DS_Store index 384c9cb8ddfff05f3ffbc2e0b26af8608a1c1229..99a6944efa2589f10e8a32adf8ff56bcc515f570 100644 GIT binary patch literal 8196 zcmeHMJ8u&~5T13M_>w4+BVLgp;(!8>oZyQcqd;Sf5u%~M2nrGfzeo({JIfCYvLd-j zg?P0Tw1|p=5+Owt(4|NSCI5p8zTMlHJwGI>2+6zB?(FT%?9R;R-Mu*z5lb}+7SRk5 z8K|6wC(-mNoX=}d3CIx>ltG`!C5MWrb*lA9>j51B9RVEy9RVEy9fAKL0=TnzF$UcG z9#^+I0y+Xi83BGin5dj4C2f0D935yx3IH0!uqfyw4-h)0q)AEJ9u=yX)5{*1RAn;7 zV4gboCKm@yO4|0Qr%udMCni^BGDBfvb?BKwoLJJMy44ZT5$KJ8iJ=L~BXciPMa|!D z*ls>&yE*Xrmb!vE|63IF2I$ypRwnP3D?)-f9|y^m-E>;cZA^dJeY1J#E1$ow9c8!h z&$5+uW&J>un-Qb}mGCv9?)N9K2A=9qM^5!&`rPZ2>Kv-wXK!wA=g$kfJG!c^{rIYV z)9Ect4WAz%>Mp*R6sbz{;>*bszpeBEa;mKpWK))&LaPD!zB+-uE}c=Jo250ZQuEKw zW(P~=nzf3=>2t1PmumHB^al%!1V_h0M#z{nRx;~uGgHsj8?{undXGQdc3nHS-_Pdm zl#0#O@ZqbjQ_q&1VpS-V3Pp%4-z_->x0!MqPN61rGakbjH^x`Pv#r)#Y+=cYm~-*O z!bZewSr-?g5z~rWiyIr`#*s4@F5g;xWS1THC0syZ@@}9h@43^yLQe^R3NcM39{RZ| z$h+_JJJ&ss6@3-v{t_zCbZCnkqUb-)R2|!O_)m~qJO*eQlmn6cbSuuf5d=Xg1V~H+sp2G!{f#AFV)9027Px#xrQ{8+Opv}xW5^RsA6f{S@mceAS;;=ESk1ru4@r z^Y;`SB%}Hx-@+#N$+vGaPKrF9yY|00+21NBJCB1d!w`WH&&e5{|6ju|Mt=tw2Gq5W zIs*O(uwXiqPGM~S{mIYvvV0SR_a%eNwNXKZ3L24)gNk$w0al77uK)l5 diff --git a/docs/pages/sdk/unity/session-management.mdx b/docs/pages/sdk/unity/session-management.mdx new file mode 100644 index 0000000000..aa12f5f1b3 --- /dev/null +++ b/docs/pages/sdk/unity/session-management.mdx @@ -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. \ No newline at end of file diff --git a/nav.ts b/nav.ts index 7b02f1ef92..3b0afdfc7c 100644 --- a/nav.ts +++ b/nav.ts @@ -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' }, {