Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get TokenActivity to work with custom IdP #101

Closed
ndorigatti opened this issue Aug 11, 2016 · 5 comments
Closed

Can't get TokenActivity to work with custom IdP #101

ndorigatti opened this issue Aug 11, 2016 · 5 comments
Labels

Comments

@ndorigatti
Copy link

Hello all,
I've downloaded and run locally mitreid server, and I'm trying to integrate it with this app, following the instructions, but I have issues with TokenActivity, to be more specific I get the snackbar saying:
"Token refresh Failed"
and debugging I found out that there is an "AuthorizationException" whose json is:
{"type":0,"code":3,"errorDescription":"Network error"}

The issue is on token request (I debugged it), because i can see the login and the redirect works correctly (I see the app going on the web server apps list), but token won't work.
I don't think it is an issue of a mitre configuration (but it could be?),

The grant type is set to: "authorization code" and "refresh", under response type, "code" "token" and "id_token" are enabled.

What else can I do? the token endpoint is correct, but is not working!

@ndorigatti
Copy link
Author

I found the issue:
The library sends the clientID and clientSecret ONLY when and if provided in the DynamicRegistration url. In my case i Could not provide dynamic registration because I was testing locally in my pc, so i had to change the library and allow a customized client secret setter.
Anyway I could not get user info, i think the library is not complete...

@allek5
Copy link

allek5 commented Oct 7, 2016

I'm having the same error trying to make it work with Dropbox.
Can you please explain how did you solve the problem?

@ndorigatti
Copy link
Author

@allek5 Well I just "hacked" the code in AuthState there is the method "getClientSecret" and at line 632 there is the method getClientAuthentication() which takes the clientsecret (if any) and acts like that

@allek5
Copy link

allek5 commented Oct 14, 2016

Thx, it helped.

@iainmcgin
Copy link
Member

I think this bug is probably obsoleted by the current demo app changes, and it is now possible to directly specify a client authentication when making token requests. Issue #179 tracks closing the last hole, providing a client authentication object as part of performActionWithFreshTokens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants