From e553e9ff0b8d2cfc5a2c303def5c0183c68f07a7 Mon Sep 17 00:00:00 2001 From: Erin Date: Sun, 12 Nov 2023 12:59:38 -0500 Subject: [PATCH] add prev, next links to AuthState --- src/lib/server/entity/AuthState.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/server/entity/AuthState.ts b/src/lib/server/entity/AuthState.ts index 30f7351..bd1efb4 100644 --- a/src/lib/server/entity/AuthState.ts +++ b/src/lib/server/entity/AuthState.ts @@ -14,6 +14,14 @@ export class AuthState { @Column({type: 'enum', enum: AuthProvider, nullable: false}) provider!: AuthProvider; + /** Where the user will be sent if authentication is cancelled */ + @Column({type: 'varchar', length: 300, nullable: false}) + prev = '/'; + + /** Where the user should be redirected after successfully authenticating */ + @Column({type: 'varchar', length: 300, nullable: false}) + next = '/'; + /** The state value itself */ @Column({type: 'varchar', length: 32, nullable: false}) state = crypto.randomBytes(16).toString('hex');