mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
[DEVIN: Konsti] Add isAnonymous to BaseUser interface and implementation (#577)
Add isAnonymous property to the user object that is returned by the functions in stack-app. The User CRUD type already has is_anonymous, this PR adds it to the BaseUser interface and updates the _createBaseUser method to include it. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Konstantin Wohlwend <n2d4xc@gmail.com>
This commit is contained in:
parent
7c2bd3f701
commit
15e32e9e3f
@ -797,6 +797,7 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
|
||||
oauthProviders: crud.oauth_providers,
|
||||
passkeyAuthEnabled: crud.passkey_auth_enabled,
|
||||
isMultiFactorRequired: crud.requires_totp_mfa,
|
||||
isAnonymous: crud.is_anonymous,
|
||||
toClientJson(): CurrentUserCrud['Client']['Read'] {
|
||||
return crud;
|
||||
}
|
||||
|
||||
@ -147,6 +147,7 @@ export type BaseUser = {
|
||||
readonly passkeyAuthEnabled: boolean,
|
||||
|
||||
readonly isMultiFactorRequired: boolean,
|
||||
readonly isAnonymous: boolean,
|
||||
toClientJson(): CurrentUserCrud["Client"]["Read"],
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user