update cloudflare context
This commit is contained in:
@@ -13,13 +13,16 @@ export type User = {
|
||||
refreshToken: string
|
||||
}
|
||||
|
||||
export function createAuth(env, redirectURI = null) {
|
||||
export function createAuth(
|
||||
env: Record<string, any>,
|
||||
redirectURI: string | null = null
|
||||
) {
|
||||
const authenticator = new Authenticator()
|
||||
const strategy = new OAuth2Strategy(
|
||||
{
|
||||
clientId: env.CLIENT_ID,
|
||||
clientSecret: env.CLIENT_SECRET,
|
||||
redirectURI: redirectURI ?? env.REDIRECT_URI,
|
||||
redirectURI: (env?.REDIRECT_URI ?? redirectURI) || undefined,
|
||||
authorizationEndpoint: `${env.ISSUER_URL}/authorize`,
|
||||
tokenEndpoint: `${env.ISSUER_URL}/token`,
|
||||
tokenRevocationEndpoint: `${env.ISSUER_URL}/revoke`,
|
||||
|
||||
Reference in New Issue
Block a user