Module registration request: SecureSocial

973 views
Skip to first unread message

Jorge Aliss

unread,
Nov 11, 2011, 5:53:29 PM11/11/11
to play-fr...@googlegroups.com
Module name:
securesocial

Display Name:
SecureSocial

Description:
SecureSocial allows you to add an authentication UI to your app that
works with services based on OAuth1, OAuth2, OpenID and OpenID+OAuth
hybrid protocols. The following services are supported:

- Twitter (OAuth1)
- Facebook (OAuth2)
- Google (OpenID + OAuth Hybrid)
- Yahoo (OpenID + OAuth Hybrid)
- LinkedIn (OAuth1)
- Foursquare (OAuth2)
- MyOpenID (OpenID)
- Wordpress (OpenID)
- Username and Password

Project home page:
https://github.com/jaliss/securesocial

OpenID:
https://www.google.com/accounts/o8/id?id=AItOawlpadImhB-aT17ydVHONEMFOyWti0l5iRc

Olivier Refalo

unread,
Nov 11, 2011, 9:14:34 PM11/11/11
to play-fr...@googlegroups.com
good job,

I had the same idea but using the excellent SocialAuth library http://code.google.com/p/socialauth/

Obviously, using the native Play API makes this a better candidate.

Great job!

Jorge Aliss

unread,
Nov 11, 2011, 9:46:04 PM11/11/11
to play-fr...@googlegroups.com
Hi Olivier,

Thanks! Hope you find it useful.
Let me know if you have any questions.

Jorge

> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/a2fi3ibmOUYJ.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
>

Rakesh Waghela

unread,
Nov 12, 2011, 3:09:55 AM11/12/11
to play-fr...@googlegroups.com
Tested fb , twitter and google accounts !

fb,gmal was already logged in other tabs, twitter was not open.

fb : worked fine thru test url you provided, directly went to authorization page of fb and then logout screen of your app.
twitter : worked fine too, as I was not logged in , prompted  for twitter credentials, then logout screen of your app, fine !
gmail : was already open in other tab, prompt for "allowing" appeared, allowed , but no success with error message .

"There was an error while trying to log you in. Please try again." , tried several times ! logged out gmail too , then tried again no success !
 

Dominik Dorn

unread,
Nov 12, 2011, 8:07:41 AM11/12/11
to play-fr...@googlegroups.com
First: THIS IS AMAZING!

Its a little buggy sometimes, the first time I connected to Facebook / Yahoo
I allowed the app, but it also responded with the error Rakesh noted.

How have you configured Facebook to not allow the user to use a proxy
email address instead of his real one?


Well done!

Dominik

> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/play-framework/-/y3BHI8lt60oJ.


> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
>

--
Dominik Dorn
http://dominikdorn.com
http://twitter.com/domdorn

Skripten, Mitschriften, Lernunterlagen, etc. findest Du auf
http://www.studyguru.eu !

Jorge Aliss

unread,
Nov 12, 2011, 8:13:07 AM11/12/11
to play-fr...@googlegroups.com
Hi Rakesh,

I checked the logs and found a NullPointerException that was being
raised on the Google implementation. I think this was caused because
your account must not have an avatar set. I am checking that in my
code now. Can you confirm it's working for you now?

Thanks,
Jorge

> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/play-framework/-/y3BHI8lt60oJ.

Jorge Aliss

unread,
Nov 12, 2011, 8:15:08 AM11/12/11
to play-fr...@googlegroups.com
Hi Dominik,

Thanks! Glad you like it!

I just sent an email about the problem Rakesh found. I think it's
fixed now. If you could try again that'd be great.

Not sure I understand your question about the email on Facebook. Can
you expand a bit more?

Thanks,

Jorge

Dominik Dorn

unread,
Nov 12, 2011, 8:43:51 AM11/12/11
to play-fr...@googlegroups.com
> Not sure I understand your question about the email on Facebook.  Can
> you expand a bit more?
Nevermind, my app on facebook was quite old and had a different
setting enabled which allowed
users to define if they want to provide their real email or a proxy
email address... that's not available anymore
in the new dialog.


Do you have plans to provide a way to ask the user to extend the
permissions they gave us?
For Facebook its simply calling the oauth callback with a modified
scope=... param again.

Jorge Aliss

unread,
Nov 12, 2011, 6:37:36 PM11/12/11
to play-fr...@googlegroups.com
Hi Dominik,

The scope I included in the demo app is what SecureSocial needs to
provide your app with the minimum information I wanted to have for all
the providers. That is: a user id, display name, email and avatar
url.

If your app needs to get more information or call an API that needs
different permissions you can just add the other scopes you need in a
comma separated list in the "scope" property for that provider in the
application.conf (eg: securesocial.facebook.scope=scope1,scope2)

Then when users try to log in the external service (eg: Facebook) will
let users know what kind of information your app is requesting.
Is that good for you?

Jorge

Then, when the user tries to log in will see all the information your
app is requesting.

Marius Andra

unread,
Nov 15, 2011, 4:44:44 PM11/15/11
to play-fr...@googlegroups.com
Hey,

I started implementing a new site using the securesocial module. 

However it was lacking some features, so I added them. The things I added are:

1) To be able to access the user object from controllers that don't require authentication (but can still show a sign out link if you're logged in)
2) The ability to redirect the user to whatever page after he/she signs out. 

The changes are here and I also submitted a pull request.


Btw, great work with the module! :-)


Marius

Marius Andra
+372 56 616 347

Jorge Aliss

unread,
Nov 16, 2011, 7:38:06 AM11/16/11
to play-fr...@googlegroups.com
Hi Marius,

I like the 2 features you proposed. I think I can simplify the
implementation of number 1 to avoid using another controller as I saw
in your pull request. Will review things and let you know.

Thanks for your feedback and it's great you liked the module :-)
Cheers,

Jorge

Jorge Aliss

unread,
Nov 16, 2011, 7:23:18 PM11/16/11
to play-fr...@googlegroups.com
Hi Marius,

I just committed some changes to include what you needed. I did not
use your pull request because I found an easier way.
Let me know if this works for you.
Thanks!,

Jorge

Nicolas Leroux

unread,
Nov 19, 2011, 1:33:32 PM11/19/11
to play-fr...@googlegroups.com
Hi Jaliss,

I have just published your module as it has been approved by the committee (and I am back from Devoxx ;) ). Sorry for the delay.


Nicolas

Cyril Lacôte

unread,
Nov 21, 2011, 12:31:25 AM11/21/11
to play-framework

I have a newbie question (sorry about that).

I'm trying to use this new "securesocial" module, but can't have it
installed :

Brian:linkit Sryl$ play install securesocial
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.2.3, http://www.playframework.org
~
~ No module found 'securesocial'
~ Try play list-modules to get the modules list
~

"securemodule" module is yet listed in official repository :

Brian:linkit Sryl$ play list-modules
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.2.3, http://www.playframework.org
~
~ You can also browse this list online at:
~ http://www.playframework.org/modules
~
... snipped ...
~ [securesocial]
~ SecureSocial
~ http://www.playframework.org/modules/securesocial
~ (No versions released yet)

Is it because of the "No versions released yet", or am I missing
something?
Do we have to wait for Jorge to release a version?

Thanks.


Cyril.


On Nov 20, 2:33 am, Nicolas Leroux <leroux.nico...@gmail.com> wrote:
> Hi Jaliss,
>
> I have just published your module as it has been approved by the committee (and I am back from Devoxx ;) ). Sorry for the delay.
>
> Nicolas
>
> On Nov 11, 2011, at 11:53 PM, Jorge Aliss wrote:
>
>
>
>
>
>
>
> > Module name:
> >securesocial
>
> > Display Name:
> >SecureSocial
>
> > Description:

> >SecureSocialallows you to add an authentication UI to your app that


> > works with services based on OAuth1, OAuth2, OpenID and OpenID+OAuth
> > hybrid protocols. The following services are supported:
>
> > - Twitter (OAuth1)
> > - Facebook (OAuth2)
> > - Google (OpenID + OAuth Hybrid)
> > - Yahoo (OpenID + OAuth Hybrid)
> > - LinkedIn (OAuth1)
> > - Foursquare (OAuth2)
> > - MyOpenID (OpenID)
> > - Wordpress (OpenID)
> > - Username and Password
>
> > Project home page:
> >https://github.com/jaliss/securesocial
>
> > OpenID:

> >https://www.google.com/accounts/o8/id?id=AItOawlpadImhB-aT17ydVHONEMF...

Jorge Aliss

unread,
Nov 21, 2011, 10:15:16 AM11/21/11
to play-fr...@googlegroups.com
Hi Nicolas,

Don't worry about the delay :-)
Thanks!

Jorge

Jorge Aliss

unread,
Nov 21, 2011, 10:16:36 AM11/21/11
to play-fr...@googlegroups.com
Hi Cyril,

The module was approved during the weekend and I had not uploaded the
distribution files to the repository yet. I just did so it should
work. Please try again and let me know if you have any problems.

Jorge

Cyril Lacôte

unread,
Nov 21, 2011, 3:17:02 PM11/21/11
to play-framework

Alright, it works fine now!
Thanks for your work, I'm hungry to try it!


Cyril.


On Nov 21, 11:16 pm, Jorge Aliss <jal...@gmail.com> wrote:
> Hi Cyril,
>
> The module was approved during the weekend and I had not uploaded the
> distribution files to the repository yet.  I just did so it should
> work.  Please try again and let me know if you have any problems.
>
> Jorge
>
>
>
>
>
>
>
> On Mon, Nov 21, 2011 at 2:31 AM, Cyril Lacôte <cyril.lac...@gmail.com> wrote:
>
> > I have a newbie question (sorry about that).
>
> > I'm trying to use this new "securesocial" module, but can't have it
> > installed :
>
> > Brian:linkit Sryl$ play install securesocial
> > ~        _            _
> > ~  _ __ | | __ _ _  _| |
> > ~ | '_ \| |/ _' | || |_|
> > ~ |  __/|_|\____|\__ (_)
> > ~ |_|            |__/
> > ~

> > ~ play! 1.2.3,http://www.playframework.org


> > ~
> > ~ No module found 'securesocial'
> > ~ Try play list-modules to get the modules list
> > ~
>
> > "securemodule" module is yet listed in official repository :
>
> > Brian:linkit Sryl$ play list-modules
> > ~        _            _
> > ~  _ __ | | __ _ _  _| |
> > ~ | '_ \| |/ _' | || |_|
> > ~ |  __/|_|\____|\__ (_)
> > ~ |_|            |__/
> > ~

> > ~ play! 1.2.3,http://www.playframework.org

Marius Andra

unread,
Nov 22, 2011, 12:47:57 PM11/22/11
to play-fr...@googlegroups.com
Hey,

Apologies for the late answer. This solution works very well for me!


Thanks!

Marius

Jorge Aliss

unread,
Nov 22, 2011, 1:16:13 PM11/22/11
to play-fr...@googlegroups.com
No problem. Glad to know it worked!

Jorge

sussegaduss

unread,
Nov 24, 2011, 6:52:55 AM11/24/11
to play-fr...@googlegroups.com
Hi all!!!

first of all excellent job on the module!!!!

i was able to get facebook auth working in about 30 minutes!!!! it`s amazing!!

the problem is when im trying to log with a google account...

when i use the module i can see google`s login page, i type my email and password, but when google tries to redirect me back to my app(on address localhost:9000/auth/google), i checked the logs and im getting the following error:

      09:38:23,279 ERROR ~ Request token is missing in OpenID+OAuth callback.  Provider: google  
      securesocial.provider.AuthenticationException
      09:38:23,280 ERROR ~ Error authenticating user
      securesocial.provider.AuthenticationException

on the screen i see that default error page....

i put some logs in your code and what i found is that seems like google is not returning these required parameters for the oauth authorization to work:

 "openid.oauth.request_token";
 "openid.ext2.request_token";

What am i missing here? why google is not returning the request_token in response for the openid authentication? 



Jan Muller

unread,
Jan 4, 2012, 3:40:48 PM1/4/12
to play-fr...@googlegroups.com
i have the same issue. anyone can help?

Jorge Aliss

unread,
Jan 5, 2012, 4:07:57 PM1/5/12
to play-fr...@googlegroups.com
Google does not work with localhost.  You need a URL that is accesible on the Internet because Google needs to verify it.  You can either use something like Dyndns to create a URL for your IP (if you're in a home network for example) or you can host your app somewhere (eg: OpenShift or Heroku).

Jorge


On Wed, Jan 4, 2012 at 5:40 PM, Jan Muller <mull...@gmail.com> wrote:
i have the same issue. anyone can help?

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/LjUaB0eQSWwJ.

Jorge Aliss

unread,
Jul 18, 2012, 3:59:12 PM7/18/12
to play-fr...@googlegroups.com
Hi,

Make sure the app you configured has the SocialDirectory permission
enabled. You should select Read/Write Public and Private for it.

Hope this helps,

Jorge




On Wed, Jul 18, 2012 at 7:11 AM, abhishek paraskar
<abhishek...@gmail.com> wrote:
> Hello Jorge,
>
> I am trying the same module to login to yahoo through my application. All
> the requested parameters are set properly. But I am not able to get the
> request token after successful authentication at yahoo. Please help. Below I
> have mentioned the request/response params ...
>
> The parameters when I request to login to yahoo (i.e.
> https://open.login.yahooapis.com/openid/op/auth?-----)
> openid.ax.mode fetch_request
> openid.ax.required email,image,fullname
> openid.ax.type.email http://axschema.org/contact/email
> openid.ax.type.fullname http://axschema.org/namePerson
> openid.ax.type.image http://axschema.org/media/image/default
> openid.claimed_id https://me.yahoo.com/
> openid.ext2.consumer
> dj0yJmk9WVZnZ0RGNDhYS0pNJmQ9WVdrOWFuQlJka1kyTjJrbWNHbzlNakExT0RNeE5UWTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD05OA--
> openid.identity https://me.yahoo.com/
> openid.mode checkid_setup
> openid.ns http://specs.openid.net/auth/2.0
> openid.ns.ax http://openid.net/srv/ax/1.0
> openid.ns.ext2 http://specs.openid.net/extensions/oauth/1.0
> openid.realm http://localhost:9001
> openid.return_to http://localhost:9001/auth/yahoo
>
> And Here is the response from yahoo -
>
> openid.assoc_handle
> yROdnuG0j65Kg9ijWICSN7058FgJef4oKc1m7ZJ0bdhgBLmYbOaAsXoSudP0.hs9t7NVUCA4RwFllMapy5fGaCckSm2kpU9p0ail7PzHqf4vIpaN29nr3Od87de_pQQopIrp
> openid.ax.mode fetch_response
> openid.ax.type.email http://axschema.org/contact/email
> openid.ax.type.fullname http://axschema.org/namePerson
> openid.ax.type.image http://axschema.org/media/image/default
> openid.ax.value.email tus...@yahoo.in
> openid.ax.value.fullname Tush T
> openid.ax.value.image
> https://a248.e.akamai.net/sec.yimg.com/i/identity/profile_48a.png
> openid.claimed_id https://me.yahoo.com/a/cTNrnuUY1_OLyzv_sVWKB7FXcow-#691be
> openid.identity https://me.yahoo.com/a/cTNrnuUY1_OLyzv_sVWKB7FXcow-
> openid.mode id_res
> openid.ns http://specs.openid.net/auth/2.0
> openid.ns.ax http://openid.net/srv/ax/1.0
> openid.op_endpoint https://open.login.yahooapis.com/openid/op/auth
> openid.pape.auth_level.ni... 0
> openid.realm http://localhost:9001
> openid.response_nonce
> 2012-07-18T10:07:44Z1RaAEAvw4vwzu4VT94NRIDepnBp6sYBeoQ--
> openid.return_to http://localhost:9001/auth/yahoo
> openid.sig +sY/R/FvqWjzocDZGxN0JUOtWqc=
> openid.signed
> assoc_handle,claimed_id,identity,mode,ns,op_endpoint,response_nonce,return_to,signed,ax.value.email,ax.type.email,ax.value.image,ax.type.image,ax.value.fullname,ax.type.fullname,ns.ax,ax.mode,pape.auth_level.nist
>
> Here I am not getting the openid.ext2.request_token
>
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/7j7rBfmF6QMJ.

abhishek paraskar

unread,
Jul 19, 2012, 5:39:13 AM7/19/12
to play-fr...@googlegroups.com
Hello Jorge,

Thanks you very much for your instant response. Yes I haven't set the  SocialDirectory  permissions. After setting the required permissions it worked like a charm. Thank you very much again.....:):):)

Abhishek
> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to

Michael Folk

unread,
Oct 8, 2013, 11:51:19 PM10/8/13
to play-fr...@googlegroups.com
Jorge and Abhishek,

I am currently looking at SecureSocial for Play 2.0 and I noticed that there was not a Scala provider written for Yahoo.
Was there a reason Yahoo was not implemented? Is there anything standing in the way from using SecureSocial 2.0 and Yahoo?

Has anyone written a SecureSocial Yahoo Provider to your knowledge?

Thanks for any information, code, or advice you can provide.

Mike
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages