Skip to content

Commit

Permalink
Merge pull request #55 from centre-for-effective-altruism/dev
Browse files Browse the repository at this point in the history
Deploy clientId -> client_id fix
  • Loading branch information
Will-Howard authored Aug 13, 2024
2 parents e11586b + ce929e5 commit 159b30d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/actions/src/manage-scopes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exports.onExecutePostLogin = async (
}

const userId = event.user.user_id
const clientId = event.client.clientId
const clientId = event.client.client_id

// Whitelist of applications that can access the full set of scopes
const allowAllScopesWhitelist: string[] =
Expand Down
7 changes: 6 additions & 1 deletion scripts/actions/types/auth0-actions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ export interface ActionsDefaultSecrets {
// auth0-actions doesn't have all the types completely correct, use the modified types below.
// TODO upgrade to an officially supported type package once one becomes available

// `client_id` is incorrectly typed as `clientId` (see https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/event-object)
interface CorrectlyTypedClient<T> extends Omit<Client<T>, 'clientId'> {
client_id: string
}

export interface DefaultPostLoginEvent
extends PostLoginEvent<ActionsDefaultSecrets, any, any, any> {
secrets: ActionsDefaultSecrets
// `user` and `client` are not optional according to https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/event-object
user: UserBase<any, any>
client: Client<any>
client: CorrectlyTypedClient<any>
}

export interface DefaultPostLoginApi extends PostLoginApi {
Expand Down

0 comments on commit 159b30d

Please sign in to comment.