OpenID or oAuth2

281 views
Skip to first unread message

Jonathan

unread,
Aug 7, 2013, 5:42:12 AM8/7/13
to f3-fra...@googlegroups.com
I want to use google for authentication on my site, and was wondering if there are any advantages to using the OpenID class in F3 as compared to integrating google's Oauth2Service code? I have started down the road of Oauth2, because I haven't been able to figure out the OpenID way withing a reasonable time.

Also, if someone has an example of how to leverage F3 OpenID for google auth (or facebook, etc), that would be very helpful.

thanks

ikkez

unread,
Aug 7, 2013, 7:18:17 AM8/7/13
to f3-fra...@googlegroups.com
hi Jonathan,

you can find examples about any portion of the framework in the unit tests in the dev-branch

openid request to google:
https://github.com/bcosca/fatfree/blob/dev/app/openid.php
redirect from google and verification:
https://github.com/bcosca/fatfree/blob/dev/app/openid2.php

Jonathan

unread,
Aug 7, 2013, 12:26:36 PM8/7/13
to f3-fra...@googlegroups.com
Thanks so much. I have been looking in the wrong place for examples - did not see the dev branch (I have used github much yet).

This looks promising now!

Jonathan

unread,
Aug 7, 2013, 12:28:47 PM8/7/13
to f3-fra...@googlegroups.com
Obviously I have never use google groups before either! :)

Jonathan

unread,
Aug 8, 2013, 5:12:15 AM8/8/13
to f3-fra...@googlegroups.com

Is there a way to skip or bypass the google auth screen if the user has already approved the application previously? This can be done with Oauth2 with "auto", but what about OpenID?

ikkez

unread,
Aug 8, 2013, 5:32:33 AM8/8/13
to f3-fra...@googlegroups.com
hm, i'm not sure what's wrong, but when i run the unit test, and log into google, i do not get the auth screen a 2nd time when refreshing the original auth-login page... so everything works fine here.

bcosca

unread,
Aug 8, 2013, 5:35:07 AM8/8/13
to f3-fra...@googlegroups.com
Make sure you choose to stay signed in.

Jonathan

unread,
Aug 8, 2013, 4:04:19 PM8/8/13
to f3-fra...@googlegroups.com
I'm referring to the authorization screen, not authentication. e.g.; requesting permission to access email, profile, etc...

Jonathan

unread,
Aug 14, 2013, 11:00:38 AM8/14/13
to f3-fra...@googlegroups.com
Just wanted to respond to this to clear things up. It was a configuration on my side that caused the authorization prompt every time. The OpenID provider works fine, and doesn't prompt for authorization each time now. Thanks for your responses.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages