-
Notifications
You must be signed in to change notification settings - Fork 104
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
Restful #79
Comments
Yep, looks simple enough. Just follow the instructions and let me know if you have any problems. Quick note: this module stores the access token in |
Hi amnah first: great work with this module. Unfortunately I don't get it with my restful api. The webversion works fine, but I'm not able to connect via facebook in my api. Is there a tutorial or an example of how to handle that with your module? |
This module simply uses the official yii2-authclient extensions for handling social auth. Unfortunately I can't seem to find any guides on how to use that extension with a rest api ... You may need to do some legwork on this one. I'd recommend asking them on the yii2 forums |
Thank you for your support. Well, as far as I know, yii2 authclient does just the authentication part and it's your module that makes the database inserts. And that's exactly what I need. In my app I already get all the facebook data including the access token. Now I'd just need to somehow take this informations and verify if the user is already in the database or not. If not, create the user, otherwise return auth-token. |
Ah, gotcha. So what you want to do is look at the AuthController and read through/copy the code. It's a bit complicated, but the basic flow is:
|
Got it, thank you very much! |
Do you think it is possible to configure a Restful service based on your user authentication module and, maybe, use auth_key or api_key for access-token too?
http://www.yiiframework.com/doc-2.0/guide-rest-authentication.html
The text was updated successfully, but these errors were encountered: