Disambiguation of the deactivation

This commit is contained in:
Eric Bailey
2024-05-29 18:13:51 -05:00
parent 4d39ef2e19
commit 1b0cdf1b90
6 changed files with 15 additions and 14 deletions
+3 -2
View File
@@ -10,11 +10,12 @@ export function readLastActiveAccount() {
return accounts.find(a => a.did === currentAccount?.did)
}
export function isSessionDeactivated(accessJwt: string | undefined) {
export function isSignupQueued(accessJwt: string | undefined) {
if (accessJwt) {
const sessData = jwtDecode(accessJwt)
return (
hasProp(sessData, 'scope') && sessData.scope === 'com.atproto.deactivated'
hasProp(sessData, 'scope') &&
sessData.scope === 'com.atproto.signupQueued'
)
}
return false