-
-
Notifications
You must be signed in to change notification settings - Fork 797
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
Integrating FOSUserBundle & HWIOAuthBundle #81
Comments
Hello, I wanted the same thing: Creating users by Twitter Login. But this is not possible atm. You have to be logged in to symfony2 already - than you can connect the accounts. In Twitter Ouath you don't get the email address, so storing a "new" user is not possible. |
@mablae Ah - with Google you do. So in the case of Twitter, you should have any information filled in that IS retrievable populated into a form, and then the user just needs to fill in their email address. The twitter ID should be already set in the form in a hidden field. Was this the situation for you? |
@nickrouty: Right, I had this registration-form once. But now I got stuck with my config at all. So there is just the Or sth else goes wrong, like the session before is still active i.e. I will do some more research this evening and then post again. |
Hi. What if I want to use other FormType for normal registration and other for OAuth registration? Tried to set:
But it looks like it needs Form and not FormType. Am I wrong? |
Solution how to define service returning Form:
|
We really need to add proper documentation for integration with the FOSUserBundle. I'm about to install this on my App, so whatever I find that is not straight forward, I'll try to help out with. |
Hello, Shall I need to add Is it possible to load class |
@justin-amt I don't understand what you mean. Composer is about installing the packages (and autoloading them). The code in the registerBundles method creates an instance of the bundle class and give it to the kernel. |
Closing this. #67 keep track of the (lack) of documentation. ;) |
@stof : What I mean is when I installing the
After installing, I need to create an HWIOAuthBundle and FOSUserBundle instance in AppKernel. Can I add HWIOAuthBundle instance only in Appkernel and create FOSUserBundle instance inside HWIOAuthBundle files? Dependent Bundle instance should be avoided from AppKernel and it should be created inside HWIOAuthBundle files. Is it possible? |
@justin-john no you cannot. Thus, FOSUserBundle is not a required dependency of HWIOAuthBundle, only an optional one |
hi, please complete the FOSUserBundle integration. or maybe you can send me your files, so that i can find out why it's not working in my bundle. btw i get a bad curl_setopt error: safemode is off (phpinfo();) if you can help me - maybe you've got a amazon wishlist or something (donate) like that? |
Has anyone been able to fully integrate these 2 bundles ? I've had no luck so far. I'm trying with GitHub as resource-owner, I get the popup to authorize the request. I then get redirected back to the login page, but nothing happened. I'm sure I'm missing some crucial steps, like how do I link my existing users to their GitHub accounts ? I want to use the OAuth bundle to allow my existing (FOS)users to login to my CMS. I would love to see some more documentation on how to use this bundle. |
I have the same problem but I see the error User '721814015' not found. where The documentation isn't really clear and I have seen people both say that you can't have HWIOAuthBundle/FOSUserBundle automatically register new users as they connet AND people who say that it's workin fine for them. If someone could shed some light on this I'd be immensely grateful. |
Hey tobiassjosten check the column type in the model for facebookId or googleId, string works for me. |
I took the advice in #116 and that worked a charm. |
I have managed to install this… and make it work. I will present my solution. All the code is available in this Gist. Mostly it is as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:
Here are the steps:
Using this code, when:
I think this is the behavior everybody was expecting :). |
I am now able to login to an account through Google, however I am having to manually insert the id that it is returning into the google_id field for an existing test user in order for that to work. As far as it actually automatically creating an account for the user, that is not happening, and I'm not sure how that should be done, from what I have read, it seems that the configuration that I now have should be doing that.
config.yml
security.yml
routing.yml
Acme/UserBundle/OAuth/Response/GoogleUserResponse.php
I would like to use this to add more data from google directly into the user's account. The idea is to allow a user to register with us through our own registration form, or to click on an OAuth provider, and we will then create their account for them. This response implementation would be the start of that, as we would be able to pull in the different fields that google provides after authorization.
The text was updated successfully, but these errors were encountered: