Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auth] Implement dbAuth middleware #10443

Open
dac09 opened this issue Apr 11, 2024 · 0 comments
Open

[Auth] Implement dbAuth middleware #10443

dac09 opened this issue Apr 11, 2024 · 0 comments
Assignees

Comments

@dac09
Copy link
Collaborator

dac09 commented Apr 11, 2024

Implement dbAuth middleware in a new package:

import { createDbAuthMiddleware } from '@redwoodjs/auth-dbauth-middleware'

so we can use in entry.server like so:

export const registerMiddleware = () => {
  const dbAuthMiddleware = createDbAuthMiddleware({
    cookieName,
    dbAuthHandler,
    getCurrentUser,
  })
  return [dbAuthMiddleware]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants