Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Nov 15, 2023
1 parent 5e6be16 commit cf9712e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ export async function AuthInternal(
switch (action) {
case "signin":
if ((csrfDisabled || options.csrfTokenVerified) && options.provider) {
const signin = await actions.signin(request, options)
const signin = await actions.signIn(request, options)
if (signin.cookies) cookies.push(...signin.cookies)
return { ...signin, cookies }
}

return { redirect: `${options.url}/signin?csrf=true`, cookies }
case "signout":
if (csrfDisabled || options.csrfTokenVerified) {
const signout = await actions.signout(sessionStore, options)
const signout = await actions.signOut(sessionStore, options)
if (signout.cookies) cookies.push(...signout.cookies)
return { ...signout, cookies }
}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/lib/routes/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { callback } from "./callback"
export { providers } from "./providers.js"
export { session } from "./session.js"
export { signin } from "./signin/index.js"
export { signout } from "./signout.js"
export { signIn } from "./signin"
export { signOut } from "./signout.js"
2 changes: 1 addition & 1 deletion packages/core/src/lib/routes/signin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {
* For OAuth, redirects to the provider's authorization URL.
* For Email, sends an email with a sign in link.
*/
export async function signin(
export async function signIn(
request: RequestInternal,
options: InternalOptions<"oauth" | "oidc" | "email">
): Promise<ResponseInternal> {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/routes/signout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { SessionStore } from "../utils/cookie.js"
* In any case, the session cookie is cleared and
* {@link EventCallbacks.signOut} is emitted.
*/
export async function signout(
export async function signOut(
sessionStore: SessionStore,
options: InternalOptions
): Promise<ResponseInternal> {
Expand Down

1 comment on commit cf9712e

@vercel
Copy link

@vercel vercel bot commented on cf9712e Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.