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

Standalone tokens (without user model / tokenable_type relationship) #494

Closed
TheNewSound opened this issue Jan 22, 2024 · 1 comment
Closed

Comments

@TheNewSound
Copy link

TheNewSound commented Jan 22, 2024

Hi,

Currently the polymorphic relationship 'tokenable' of a PersonalAccessToken is not Nullable. This forces tying a token to a model.

I'm looking to create two types of tokens:

  1. The usual authentication tokens (also handle authorization via abilities).
  2. Tokens solely for authorization. These can be given to unauthenticated requests (e.g. no specific user logged in) that need a bit more access than just 'guests'.

For this last purpose it would be nice if Sanctum supports creating (and using the authorization checks of) tokens that aren't tied to an application model.

@driesvints
Copy link
Member

I'm sorry but right now this is out of scope of this package and we don't have immediate plans to add this.

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

No branches or pull requests

2 participants