Skip to content

Commit

Permalink
Merge pull request #7 from kinde-oss/fix/offline-scope
Browse files Browse the repository at this point in the history
fix: offline scope
  • Loading branch information
DanielRivers authored Sep 12, 2024
2 parents 8dbb5fc + 9be8fce commit 6760cff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export enum Scopes {
email = "email",
profile = "profile",
openid = "openid",
offline_access = "offline_access",
offline_access = "offline",
}

export type LoginMethodParams = Pick<
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/generateAuthUrl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe("generateAuthUrl", () => {
state: "state123",
};
const expectedUrl =
"https://auth.example.com/oauth2/auth?client_id=client123&response_type=code&start_page=login&redirect_uri=https%3A%2F%2Fexample2.com&scope=openid+profile+offline_access&prompt=create&state=state123";
"https://auth.example.com/oauth2/auth?client_id=client123&response_type=code&start_page=login&redirect_uri=https%3A%2F%2Fexample2.com&scope=openid+profile+offline&prompt=create&state=state123";

const result = generateAuthUrl(domain, IssuerRouteTypes.login, options);
const nonce = result.url.searchParams.get("nonce");
Expand All @@ -80,7 +80,7 @@ describe("generateAuthUrl", () => {
prompt: "create",
};
const expectedUrl =
"https://auth.example.com/oauth2/auth?client_id=client123&response_type=code&start_page=login&redirect_uri=https%3A%2F%2Fexample2.com&scope=openid+profile+offline_access&prompt=create";
"https://auth.example.com/oauth2/auth?client_id=client123&response_type=code&start_page=login&redirect_uri=https%3A%2F%2Fexample2.com&scope=openid+profile+offline&prompt=create";

const result = generateAuthUrl(domain, IssuerRouteTypes.login, options);
const nonce = result.url.searchParams.get("nonce");
Expand Down

0 comments on commit 6760cff

Please sign in to comment.