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
Highlight existence of $user->currentAccessToken() #48
Comments
Heya, feel free to send in a PR if you want. |
Hey @driesvints, i've noticed a strange bug when writing unit tests for logout. My logout() method is the same as described above. Test code => https://pastebin.com/LZ7wMgeg Response i get: Weird thing here is that route actually works when you call it from Postman/Application, but test fails. Maybe i am doing something wrong ? |
I'm getting the same |
I am also facing the same issue. |
The Bearer prefix must be added to the Header Authorization |
In my case
error was because of EnsureFrontendRequestsAreStateful::class in app/Http/Kernel.php 'api' section.
this guard check is prior you create new TransientToken. |
do you find any valid solution to this issue? i want use spa and http authentication with the same code but i got error in user()->currentAccessToken()->delete(),also i use EnsureFrontendRequestsAreStateful middleware |
While fully fledged documentation may not be a priority at the moment I just wanted to raise this as a half thank you and half "please make others aware of the existence of this feature" issue.
Using Passport I had to do all this just to be able to log a user out:
and with Airlock this seemingly is just reduced to
which is a huge improvement both in terms of readability and the amount of reverse engineering needed to achieve this. I would like to suggest that the existence of this method of the
Laravel\Airlock\HasApiTokens
trait be featured in the documentation to make sure nobody misses this, as I think this is probably my favorite addition by Airlock yet.I originally started this issue by asking for this feature to be implemented, but when I went to check the source, sure enough it already was! Hence why I suggest highlighting it instead.
The text was updated successfully, but these errors were encountered: