IdentityAPI
此内容尚不支持你的语言。
Defined in: services/identity.ts:37
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new IdentityAPI():
IdentityAPI
Returns
Section titled “Returns”IdentityAPI
Accessors
Section titled “Accessors”available
Section titled “available”Get Signature
Section titled “Get Signature”get available():
boolean
Defined in: services/identity.ts:40
Whether this platform can sign a player in at all — what a menu reads to hide its sign-in button rather than offer one that cannot work.
Returns
Section titled “Returns”boolean
Methods
Section titled “Methods”login()
Section titled “login()”login():
Promise<LoginResult>
Defined in: services/identity.ts:52
Begin a sign-in.
Rejects with the host’s own words when it fails — this is a network round trip, and “it failed” without a reason is not something a game can act on. Rejects immediately where the platform has no sign-in, so a caller that skipped available hears about it rather than hanging.
Returns
Section titled “Returns”Promise<LoginResult>
sessionValid()
Section titled “sessionValid()”sessionValid():
Promise<boolean>
Defined in: services/identity.ts:63
Whether the host still regards the last sign-in as current.
The reason to ask is to SKIP a login: if the session your server holds is still good, exchanging a fresh code buys nothing. False where there is no sign-in at all — there is nothing current about nothing.
Returns
Section titled “Returns”Promise<boolean>