Skip to content

Commit

Permalink
ExperimentalAuth: update documentation for signOut()
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunanoordin committed Dec 20, 2024
1 parent 065b7ed commit 9e6adba
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/lib-panoptes-js/src/experimental-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ async function signIn (login, password, _store) {

/*
Sign out from the Zooniverse.
This action attempts to sign the user out of the Panoptes system. If successful,
the function returns true. If unsuccessful - because no user was signed in to
begin with - it returns false.
NOTE: previously, in old PJC, if there was no user signed in, an error was
thrown.
Input:
- _store: (optional) data store. See default globalStore.
Expand All @@ -284,9 +290,10 @@ Output:
- Throws an error on a network or API failure.
Side Effects:
- on success, _store's userData, bearerToken, bearerTokenExpiry, and
refreshToken are deleted.
refreshToken are reset to null/empty strings/NaNs.
Events:
- TODO
- "change": when the user successfully signs out, a null is broadcasted with
the event, to indicate the Panoptes User is now deleted.
Possible Errors:
- Uncategorised network errors.
- Note: if there's no user logged in, this isn't an error.
Expand Down

0 comments on commit 9e6adba

Please sign in to comment.