From f218390d60b7d48e5d078dcc00005be75956231c Mon Sep 17 00:00:00 2001 From: Regalijan Date: Thu, 26 Oct 2023 15:22:05 -0400 Subject: [PATCH] Display text on mobile token endpoint --- functions/api/auth/mobile/token.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/functions/api/auth/mobile/token.ts b/functions/api/auth/mobile/token.ts index c9a1256..027d86d 100644 --- a/functions/api/auth/mobile/token.ts +++ b/functions/api/auth/mobile/token.ts @@ -107,7 +107,17 @@ export async function onRequestGet(context: RequestContext) { .replaceAll("/", "_") .replaceAll("=", ""); - return Response.redirect( - `com.carcrushers.app://login-callback?token=${header}.${claimSet}.${encodedSignature}`, - ); + return new Response(` + + +

You were logged in successfully. If this page does not close in a few seconds, please click done.

+ + +`, { + headers: { + "content-type": "text/html", + location: `com.carcrushers.app://login-callback?token=${header}.${claimSet}.${encodedSignature}` + }, + status: 302, + }); }