chrome extension Oauth callback url

3,991 views
Skip to first unread message

ASC

unread,
Jan 17, 2014, 12:37:38 AM1/17/14
to chromium-...@chromium.org
I'm attempting to have users use Oauth2 to authenticate into an web application from a chrome extension but am unable to get the access token from the GET parameters response in my chrome extension. I have provided a callback url of https://<Extension ID>.chromiumapp.org/index.html to the application but this doesn't seem to point to the local chrome extension. Also the application will neither accept chrome-extension://<Extension ID>/index.html as a callback url nor will it allow me to pass a separate redirect_uri GET parameter with the initial request.

In addition, i'm not sure if this will be helpful but the application documentation provides the following instructions for client side authentication:
1. Your app needs to acquire a token for a user, and sends that user to: https://<application>/authorize?client_id={API key}&response_type=token&state={session string}
2. The user authenticates with the application and returns to the redirect URI you set up for your application with the following string appended after a # hashbang: ?access_token={the token}&state={session string}

Joe Marini

unread,
Jan 17, 2014, 2:30:40 PM1/17/14
to ASC, Chromium-extensions
Have you tried using the Identity API?





--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/59908c4b-052b-4b0e-86ab-09142364378e%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/groups/opt_out.



--
Joe Marini
Developer Advocate / Chrome Apps, Extensions, Web Store

ASC

unread,
Jan 17, 2014, 3:15:00 PM1/17/14
to chromium-...@chromium.org, ASC
That's exactly what I was looking for, thanks! For anyone that has a similar issue in the future, I used https://<Extension ID>.chromiumapp.org/index.html as the callback url in the application but the issue I was having is that that url only links to the extension when used in the context of chrome.identity.launchWebAuthFlow.


On Friday, January 17, 2014 2:30:40 PM UTC-5, Joe Marini wrote:
Have you tried using the Identity API?



On Thu, Jan 16, 2014 at 9:37 PM, ASC <a...@channarasappa.com> wrote:
I'm attempting to have users use Oauth2 to authenticate into an web application from a chrome extension but am unable to get the access token from the GET parameters response in my chrome extension. I have provided a callback url of https://<Extension ID>.chromiumapp.org/index.html to the application but this doesn't seem to point to the local chrome extension. Also the application will neither accept chrome-extension://<Extension ID>/index.html as a callback url nor will it allow me to pass a separate redirect_uri GET parameter with the initial request.

In addition, i'm not sure if this will be helpful but the application documentation provides the following instructions for client side authentication:
1. Your app needs to acquire a token for a user, and sends that user to: https://<application>/authorize?client_id={API key}&response_type=token&state={session string}
2. The user authenticates with the application and returns to the redirect URI you set up for your application with the following string appended after a # hashbang: ?access_token={the token}&state={session string}

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
Reply all
Reply to author
Forward
0 new messages