Skip to content

Commit

Permalink
Fix auth error in #107 (#117)
Browse files Browse the repository at this point in the history
Fix typo in #107
  • Loading branch information
Timothy-Gonzalez authored Nov 5, 2023
1 parent 769d914 commit c6d29f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/auth/auth-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,17 +313,17 @@ export function getDevice(kv?: string): string {

// Replace everything before/after the first equal with nothing, to get KV pairs
const key: string = kv.replace(/=.*/, "");
const value: string = kv.replace(/.*=/, "");
const possibleDevice: string = kv.replace(/.*=/, "");

if (!key || key != "device") {
throw new Error("NoKey");
}

if (!value || !Config.REDIRECT_URLS.has(key)) {
if (!possibleDevice || !Config.REDIRECT_URLS.has(possibleDevice)) {
throw new Error("NoValue");
}

return value;
return possibleDevice;
}

/**
Expand Down

0 comments on commit c6d29f5

Please sign in to comment.