Skip to content

Add sanctum token auth support #45

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

Merged
merged 6 commits into from
Dec 21, 2024
Merged

Add sanctum token auth support #45

merged 6 commits into from
Dec 21, 2024

Conversation

allnightru
Copy link
Contributor

Add support for the token-based sanctum authentication.
Implementation inspired by nuxt-auth-sanctum module.

  • Added config parameter: echo.authentication.mode, "cookie" or "token".
  • Added support for external tokenStorage (implementation from nuxt-auth-sanctum module)
  • Changed "onRequest" hook to send Bearer token if authentication.mode is "token".

@manchenkoff
Copy link
Owner

Hey @allnightru, thanks for the contribution! I'll try to review this one today, in the meantime, pls check linter issues

@manchenkoff
Copy link
Owner

Closes #44

Copy link
Owner

@manchenkoff manchenkoff left a comment

Choose a reason for hiding this comment

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

minor changes and fixing linter issues are needed

@ivan-plotnikov
Copy link

+1

@manchenkoff
Copy link
Owner

UPD: needs to be tested

@manchenkoff manchenkoff merged commit fcc789a into manchenkoff:main Dec 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants