Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Very simple user validation

I'm making an app and I plan to have some cloud happening with it, but I do not want to create a user data base and have the users need to remember their username and password.

Since it will be distributed through the chrome app store it's basically guaranteed that the user will have a google account. All I want to do is:

  1. Get the user's email through the google account stuff. If I get it through there, well then their email is all the authentication I need to get that user's data.

  2. If I end up putting the application on something other than chrome browser, I'll just have the user use their email to request a validation link, and then I'll send them a validation code for that account, they put the validation code into the application, it takes that as a verified user, so that's secure and easy as well.

EDIT: I'm looking into this. So far I have:

OAuth 2 Google API

But I have a problem that I don't know what to set as my javascript origins in the Google API and there isn't too much info on this abroad. If anyone can tell me what javascript origins I need to set for a chrome extension to access google api it would be a great help.

PS: Thanks for down vote, this is why I love resorting to stack exchange.

like image 688
kyall Avatar asked May 01 '12 04:05

kyall


1 Answers

Hmmm, I think the only reason this was voted down is the fact that this question may be been asked somewhere on the site already (but I'll help you and give give a 1up).

So what you are wanting to use the Google OpenID. You will have to register your application with Google so they can provide OAuth2 tokens for you application. I have not done this with Google but with other services and it is pretty easy, just search around.

In terms of obtaining OAuth2 for your application in the chrome extension - this can be a pain since the extension is sandboxed and Google's example uses OAuth not OAuth2.

Here is solution I host on GitHub for this - I also use this in my extension GitHub Repositories:

https://github.com/jjNford/oauth2-chrome-extension

Hope this helps in some way. Don't get discourages with StackOverflow, it is a great resource with many great contributors.

Good luck!

like image 182
jjNford Avatar answered Sep 30 '22 12:09

jjNford