Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
tarasglek committed Jan 9, 2025
1 parent 6ade322 commit c18edb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion functions/_auth/callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { wrap_lastlogin } from "../lastlogin";
interface Env {
JWT_SECRET: string;
}

// this file exists solely so we can declare a route for lastlogin that we wrap so it can process oauth callback
export const onRequestGet: PagesFunction<Env> = async ({ request, env }) => {
return wrap_lastlogin(env.JWT_SECRET, async (request: Request) => {

Check failure on line 8 in functions/_auth/callback.ts

View workflow job for this annotation

GitHub Actions / Lint

'request' is defined but never used. Allowed unused args must match /^_/u
throw new Error("/_auth isn't supposed to get called, it's a dummy endpoint for lastlogin");
Expand Down
1 change: 1 addition & 0 deletions functions/lastlogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export async function handleLastLogin(
appUrl: string
) {
const wrapped_fetch = wrap_lastlogin(JWT_SECRET, async (request) => {
// this whole body would be unnecessary in a normal lastlogin-wrapped request
const email = request.headers.get("X-Lastlogin-Email");
console.log(`X-Lastlogin-Email ${email}!`);
if (!email) {
Expand Down

0 comments on commit c18edb9

Please sign in to comment.