remix-auth-oauth2
Advanced tools
Comparing version 1.7.0 to 1.8.0
@@ -36,2 +36,3 @@ import { AppLoadContext, SessionStorage } from "@remix-run/server-runtime"; | ||
context?: AppLoadContext; | ||
request: Request; | ||
} | ||
@@ -38,0 +39,0 @@ /** |
@@ -129,2 +129,3 @@ "use strict"; | ||
context: options.context, | ||
request, | ||
}); | ||
@@ -134,2 +135,5 @@ } | ||
debug("Failed to verify user", error); | ||
// Allow responses to pass-through | ||
if (error instanceof Response) | ||
throw error; | ||
if (error instanceof Error) { | ||
@@ -136,0 +140,0 @@ return await this.failure(error.message, request, sessionStorage, options, error); |
{ | ||
"name": "remix-auth-oauth2", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"main": "./build/index.js", | ||
"types": "./build/index.d.ts", | ||
"scripts": { | ||
"prepare": "npm run build", | ||
"build": "tsc --project tsconfig.json", | ||
@@ -8,0 +9,0 @@ "typecheck": "tsc --project tsconfig.json --noEmit", |
@@ -35,5 +35,12 @@ # OAuth2Strategy | ||
callbackURL: "https://example.app/auth/callback", | ||
useBasicAuthenticationHeader: false // defaults to false | ||
useBasicAuthenticationHeader: false, // defaults to false | ||
}, | ||
async ({ accessToken, refreshToken, extraParams, profile, context }) => { | ||
async ({ | ||
accessToken, | ||
refreshToken, | ||
extraParams, | ||
profile, | ||
context, | ||
request, | ||
}) => { | ||
// here you can use the params above to get the user and return it | ||
@@ -46,3 +53,4 @@ // what you do inside this and how you find the user is up to you | ||
profile, | ||
context | ||
context, | ||
request | ||
); | ||
@@ -49,0 +57,0 @@ } |
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
26310
392
229