Skip to content

Instantly share code, notes, and snippets.

@RichardLitt
Created April 16, 2015 10:26
Show Gist options
  • Select an option

  • Save RichardLitt/c63f77e3eeeee6f1b9f1 to your computer and use it in GitHub Desktop.

Select an option

Save RichardLitt/c63f77e3eeeee6f1b9f1 to your computer and use it in GitHub Desktop.
# 2015 April 16th
What am I trying to do?
I have a Chrome extension and I want to implement OAuth in it so that users can be authenticated and have accounts.
So, first, I need users. The user objects shouldn’t be too hard to implement. Juan sent me a way to do it.
Then, I need to figure out how to use Google OAuth. Actually, this doesn’t require me hitting the API for the Google Contacts I need, I believe - I should be able to just use Google OAuth before I hit the API, as that is actually a separate concern.
Beagle => Users => Google OAuth => Google Contacts API
Now, another bit of complication is that I am in an extension. So, there’s no redirect URL. I need to register my app - I need to register the Chrome Extension, and I also need to have a registered App in order to access the Google Contacts API.
A final problem is that, because I am in an extension, I have to deal with a background page, and including client side libraries with RequireJS and browserify.
Any tips?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment