adonisjs / auth

Official Authentication package for AdonisJS
https://docs.adonisjs.com/guides/auth/introduction
MIT License
187 stars 65 forks source link

Add custom token providers #215

Closed MRakox closed 10 months ago

MRakox commented 1 year ago

Proposed changes

I'd like to use API tokens with another database (mongodb) but creating a custom token provider is not possible at the time (and it's the aim of this Pull request).

I used the same code as for the existing custom providers and guards.

Types of changes

What types of changes does your code introduce?

Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

:warning: There's a small issue, I don't know how to update type declaration for configuration (to hide the warning Type '"custom_provider"' is not assignable to type '"database" | "redis"')

stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

MRakox commented 11 months ago

I'm still there :)