-
Notifications
You must be signed in to change notification settings - Fork 113
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
Method [loginUsingId] does not exist. #182
Comments
auth('app')->loginUsingId($user->id); |
You can open a new PR to help with that, lately, I'm very busy. Otherwise, I'll take a look at it by myself. |
Please provide more details:
thanks! |
You can use tokenById method. Example: |
This does something else: it generates a new token.
You can't use loginUsingId is from the StatefulGuard contract, but the whole point of an JWT/API token is that it's stateless. The What you can do is call But everything else it not meant to be here. IMHO this issue can be closed. |
The issue creator says he wants to use the user's unique ID for login which I assume he wants to generate a new token based on that ID. That's why I answered he could use the tokenById method in that case. In \PHPOpenSourceSaver\JWTAuth\JWTGuard there is already a method (tokenById) derived from \Tymon\JWTAuth\JWTGuard that can be used. https://jwt-auth.readthedocs.io/en/develop/auth-guard/#tokenbyid |
Summary
I have customized the user verification process. At this time, I use the user's unique identifier to log in, and it is prompted that there is no such method.
The text was updated successfully, but these errors were encountered: