mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat(server): introduce user friendly server errors (#7111)
This commit is contained in:
@@ -20,6 +20,10 @@ export class OAuthService {
|
||||
private readonly cache: SessionCache
|
||||
) {}
|
||||
|
||||
isValidState(stateStr: string) {
|
||||
return stateStr.length === 36;
|
||||
}
|
||||
|
||||
async saveOAuthState(state: OAuthState) {
|
||||
const token = randomUUID();
|
||||
await this.cache.set(`${OAUTH_STATE_KEY}:${token}`, state, {
|
||||
|
||||
Reference in New Issue
Block a user