FOSOauthServerBundle

Discuss Symfony 2 bundles here

Moderators: tiagojsag, dcobalt

FOSOauthServerBundle

Postby Deumus » Fri Dec 07, 2012 12:00 am

Hi all,

At first, sorry for my english. I learned it by myself and I have some difficulties for complicated text like this.
(D'ailleurs, si un francophone passe dans le coin et a une solution...)

I'm a non-pro developper and I learn Symfony (first framework) for the moment.

I build a project when I want to use SSO system.
I read a ton of articles who explain what is Oauth and I read the entire documentation of the FOSOauthServerBundle, but I always don't understand how I can implement and how it works...
I ask to a developper friend to read the documentation, but he don't understand too.


The configuration I want for this network:

- "accounts.site1.com" have the accounts DB and the users are redirected to this site to login
- "www.siteX.com" (many) require users to be identified and just need the user "login" to work

I installed FOSUserBundle and FOSOauthServerBundle on "accounts.site1.com". And that's it. I don't know what to do next... I'm totally lost!

I know some bundles provide an Oauth authentification via FB, Google, ... But I don't want to force my users to create an account on this sites.

Someone can help me to understand how to implement all of this? I really need to understand that.
I really appreciate all of your help! :)

Thanks in advance.
Deumus
Junior Member
 
Posts: 2
Joined: Thu Dec 06, 2012 11:39 pm

Re: FOSOauthServerBundle

Postby Deumus » Fri Dec 07, 2012 7:58 pm

Step by step, I begin to understand...

I've done this:

- Install FOSUser+FOSOAuthServer on "accounts.site1.com"
- Install FOSUser+HWIOAuthBundle on "www.siteX.com"
- I add to "accounts.site1.com" DB a Client with "id=1234, random_id=1234, redirect_uris=http://www.siteX.com, secret=5678, allow_grant_types=token"
- And I setup the HWIOAuthBundle with this client_id and secret_id
- When I go to /connect/my_custom on "www.siteX.com", he redirect me to "accounts.site1.com/oauth/v2/auth?response_type=code&client_id=1234_1234&scope=&redirect_uri=http%3A%2F%2Fwww.siteX.com%2Fapp_dev.php%2Flogin%2Fcheck-custom"

So, it's good for this (I think)


The problem:

- On "accounts.site1.com", I have this error: "Notice: unserialize(): Error at offset 0 of 25 bytes in..."

I think it comes from the "client_id=1234_1234" in the URL.
The client_id is composed by the "_id" and "random_id" if I understand this blog: http://blog.logicexception.com/2012/04/ ... wiith.html


I search on google since 2 hours, and not find a solution...
Deumus
Junior Member
 
Posts: 2
Joined: Thu Dec 06, 2012 11:39 pm


Return to Bundles discussion

Who is online

Users browsing this forum: No registered users and 1 guest