IdentityModel / oidc-token-manager

Apache License 2.0
51 stars 36 forks source link

oidc-token-manager in browser (chrome) extension #34

Closed merijndejonge closed 8 years ago

merijndejonge commented 8 years ago

Hi, I'm trying to get the implicitflow working for a chrome extension using the oidc-token-manger. I'm able to get to the login page in a newly opened browser window using the popup_redirect_uri of oidc-token-manager. But then, after logging in, nothing happens. The popup window is not closed and the application seems to be doing nothing.

Any suggestions how could get oidc-token-manger to work in my chrome extension?

Thanks in advance.

Merijn

brockallen commented 8 years ago

I don't really know how's involved with a chrome extension and how that affects the UI assumptions in oidc-token-manager, but perhaps using the lower level oidc-client library would be better (https://github.com/IdentityModel/oidc-client)? That way you can still you a library for the protocol work, but then you can be in charge of the window/popups as necessary?

merijndejonge commented 8 years ago

@brockallen Thanks for you reply. I'll give it a try. Do you know where I can find documentation about oidc-client?

brockallen commented 8 years ago

IIRC the wiki has info

-Brock

On Jan 14, 2016, at 9:03 PM, merijndejonge notifications@github.com wrote:

@brockallen Thanks for you reply. I'll give it a try. Do you know where I can find documentation about oidc-client?

— Reply to this email directly or view it on GitHub.

merijndejonge commented 8 years ago

nothing there (https://github.com/IdentityModel/oidc-client/wiki) ... :-(

merijndejonge commented 8 years ago

In a chrome extension the window.opener property can only be used in a popup window when it has loaded a same-origin url. Otherwise the property is null. This means the call to window.opener.openPopupForTokenAsyncCallback(hash); raised an exception.

You can find more info about this here https://code.google.com/p/chromium/issues/detail?id=92669

brockallen commented 8 years ago

Not sure if the updated oidc-client will improve upon the problems you are running into. If you need to pursue it, please continue this effort over there: https://github.com/IdentityModel/oidc-client-js.