Comparing version 0.3.2 to 0.3.3
@@ -10,4 +10,4 @@ export declare class Google { | ||
}); | ||
createAuthorizationURL(state: string): Promise<URL>; | ||
validateAuthorizationCode(code: string): Promise<GoogleTokens>; | ||
createAuthorizationURL(state: string, codeVerifier?: string): Promise<URL>; | ||
validateAuthorizationCode(code: string, codeVerifier?: string): Promise<GoogleTokens>; | ||
getUser(accessToken: string): Promise<GoogleUser>; | ||
@@ -14,0 +14,0 @@ refreshAccessToken(refreshToken: string): Promise<GoogleRefreshedTokens>; |
@@ -20,6 +20,7 @@ import { TimeSpan, createDate } from "oslo"; | ||
} | ||
async createAuthorizationURL(state) { | ||
async createAuthorizationURL(state, codeVerifier) { | ||
const url = await this.client.createAuthorizationURL({ | ||
state, | ||
scope: this.scope | ||
scope: this.scope, | ||
codeVerifier | ||
}); | ||
@@ -29,6 +30,7 @@ url.searchParams.set("access_type", this.accessType); | ||
} | ||
async validateAuthorizationCode(code) { | ||
async validateAuthorizationCode(code, codeVerifier) { | ||
const result = await this.client.validateAuthorizationCode(code, { | ||
authenticateWith: "request_body", | ||
credentials: this.clientSecret | ||
credentials: this.clientSecret, | ||
codeVerifier | ||
}); | ||
@@ -35,0 +37,0 @@ return { |
{ | ||
"name": "arctic", | ||
"type": "module", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "OAuth 2.0 with built-in providers", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41580
996