Skip to content

Commit

Permalink
Fix building!
Browse files Browse the repository at this point in the history
  • Loading branch information
dac09 committed Dec 8, 2023
1 parent 0542ca7 commit b275d9f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/auth-providers/auth0/api/src/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const verifyAuth0Token = (
})
}

export const authDecoder: Decoder = async (token: string, type: string) => {
export const authDecoder: Decoder = async (token: string, type: string | null) => {
if (type !== 'auth0') {
return null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import jwksClient from 'jwks-rsa'

import type { Decoder } from '@redwoodjs/api'

export const authDecoder: Decoder = async (token: string, type: string) => {
export const authDecoder: Decoder = async (token: string, type: string | null) => {
if (type !== 'azureActiveDirectory') {
return null
}
Expand Down
7 changes: 5 additions & 2 deletions packages/auth-providers/clerk/api/src/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import type { Decoder } from '@redwoodjs/api'
/**
* @deprecated This function will be removed; it uses a rate-limited API. Use `clerkAuthDecoder` instead.
*/
export const authDecoder: Decoder = async (token: string, type: string) => {
export const authDecoder: Decoder = async (
token: string,
type: string | null
) => {
if (type !== 'clerk') {
return null
}
Expand Down Expand Up @@ -40,7 +43,7 @@ export const authDecoder: Decoder = async (token: string, type: string) => {

export const clerkAuthDecoder: Decoder = async (
token: string,
type: string
type: string | null
) => {
if (type !== 'clerk') {
return null
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/firebase/api/src/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Decoder } from '@redwoodjs/api'

// Alternative third-party JWT verification process described here:
// https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_a_third-party_jwt_library
export const authDecoder: Decoder = async (token: string, type: string) => {
export const authDecoder: Decoder = async (token: string, type: string | null) => {
if (type !== 'firebase') {
return null
}
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/netlify/api/src/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface NetlifyTokenPayload extends Record<string, unknown> {

export const authDecoder: Decoder = async (
token: string,
type: string,
type: string | null,
req: { context: LambdaContext }
) => {
if (type !== 'netlify') {
Expand Down
5 changes: 4 additions & 1 deletion packages/auth-providers/supabase/api/src/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import jwt from 'jsonwebtoken'

import type { Decoder } from '@redwoodjs/api'

export const authDecoder: Decoder = async (token: string, type: string) => {
export const authDecoder: Decoder = async (
token: string,
type: string | null
) => {
if (type !== 'supabase') {
return null
}
Expand Down
5 changes: 4 additions & 1 deletion packages/auth-providers/supertokens/api/src/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import jwksClient from 'jwks-rsa'

import type { Decoder } from '@redwoodjs/api'

export const authDecoder: Decoder = async (token: string, type: string) => {
export const authDecoder: Decoder = async (
token: string,
type: string | null
) => {
if (type !== 'supertokens') {
return null
}
Expand Down

0 comments on commit b275d9f

Please sign in to comment.