Skip to content

Commit

Permalink
chore: use as("plugin") instead of as on derive
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Jul 17, 2024
1 parent 28293ee commit d80d1d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function oauth2<Options extends ElysiaOauth2Options>(options: Options) {

return new Elysia({ name: "elysia-oauth2" })
.error("OAUTH2_REQUEST_ERROR", arctic.OAuth2RequestError)
.derive({ as: "global" }, ({ cookie, query, redirect }) => {
.derive(({ cookie, query, redirect }) => {
return {
oauth2: {
createURL: async <Provider extends keyof Options>(
Expand Down Expand Up @@ -135,5 +135,6 @@ export function oauth2<Options extends ElysiaOauth2Options>(options: Options) {
},
},
};
});
})
.as("plugin");
}

0 comments on commit d80d1d2

Please sign in to comment.