Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Display text on mobile token endpoint
  • Loading branch information
regalijan committed Oct 26, 2023
1 parent de1bb2b commit f218390
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions functions/api/auth/mobile/token.ts
Expand Up @@ -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(`<!DOCTYPE html>
<html>
<body>
<p>You were logged in successfully. If this page does not close in a few seconds, please click done.</p>
</body>
</html>
`, {
headers: {
"content-type": "text/html",
location: `com.carcrushers.app://login-callback?token=${header}.${claimSet}.${encodedSignature}`
},
status: 302,
});
}

0 comments on commit f218390

Please sign in to comment.