remix-auth-oauth2
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -1,2 +0,2 @@ | ||
import { SessionStorage } from "@remix-run/server-runtime"; | ||
import { AppLoadContext, SessionStorage } from "@remix-run/server-runtime"; | ||
import { AuthenticateOptions, Strategy, StrategyVerifyCallback } from "remix-auth"; | ||
@@ -32,2 +32,3 @@ export interface OAuth2Profile { | ||
profile: Profile; | ||
context?: AppLoadContext; | ||
} | ||
@@ -71,4 +72,4 @@ /** | ||
* }, | ||
* (accessToken, refreshToken, profile) => { | ||
* return User.findOrCreate(...); | ||
* async ({ accessToken, refreshToken, profile }) => { | ||
* return await User.findOrCreate(...); | ||
* } | ||
@@ -75,0 +76,0 @@ * )); |
@@ -44,4 +44,4 @@ "use strict"; | ||
* }, | ||
* (accessToken, refreshToken, profile) => { | ||
* return User.findOrCreate(...); | ||
* async ({ accessToken, refreshToken, profile }) => { | ||
* return await User.findOrCreate(...); | ||
* } | ||
@@ -108,2 +108,3 @@ * )); | ||
profile, | ||
context: options.context, | ||
}); | ||
@@ -110,0 +111,0 @@ } |
{ | ||
"name": "remix-auth-oauth2", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"main": "./build/index.js", | ||
@@ -56,5 +56,5 @@ "types": "./build/index.d.ts", | ||
"dependencies": { | ||
"remix-auth": "^3.0.0", | ||
"remix-auth": "^3.1.0", | ||
"uuid": "^8.3.2" | ||
} | ||
} |
@@ -30,6 +30,12 @@ # OAuth2Strategy | ||
}, | ||
async ({ accessToken, refreshToken, extraParams, profile }) => { | ||
async ({ accessToken, refreshToken, extraParams, profile, context }) => { | ||
// here you can use the params above to get the user and return it | ||
// what you do inside this and how you find the user is up to you | ||
return await getUser(accessToken, refreshToken, extraParams, profile); | ||
return await getUser( | ||
accessToken, | ||
refreshToken, | ||
extraParams, | ||
profile, | ||
context | ||
); | ||
} | ||
@@ -36,0 +42,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
24420
361
214
Updatedremix-auth@^3.1.0