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

Callback not firing #1

Open
garmeeh opened this issue Aug 11, 2018 · 12 comments
Open

Callback not firing #1

garmeeh opened this issue Aug 11, 2018 · 12 comments
Assignees
Labels
question Further information is requested

Comments

@garmeeh
Copy link

garmeeh commented Aug 11, 2018

Hi, I am currently trying to use this Strategy with next-auth. I logged an issue on next-auth because the callback didn't seem to be firing for keycloak-passport. Wondering would you maybe have any insight on why it wouldn't be firing?

@svarlamov
Copy link
Member

svarlamov commented Aug 11, 2018

Hi @garmeeh, I just read through the issue that you posted in next-auth. I'm not familiar with that project directly, however, I vaguely remember dealing with the req argument issue when I was building keycloak-passport... You can get a sample of how we implement the strategy over here

We use the signature req, accessToken, refreshToken, profile, done which requires this line in the config. Although as discussed in the next-auth issue, it seems as though you're also setting that...

Beyond that, I'm not exactly certain what the cleanest solution is, given that this is largely handled by the oauth2 boilerplate.

@svarlamov svarlamov self-assigned this Aug 11, 2018
@svarlamov svarlamov added the question Further information is requested label Aug 11, 2018
@garmeeh
Copy link
Author

garmeeh commented Aug 11, 2018

No worries @svarlamov, thanks for the looking into it for me. The auth server is great for reference 👍

@svarlamov
Copy link
Member

Sure, let me know if there's anything that I can do in the mainline keycloak-passport to support next-auth. Would be happy to do that as I'm sure it would benefit other users

@svarlamov
Copy link
Member

svarlamov commented Aug 21, 2018

@garmeeh Were you able to find the solution to this issue? Also, any luck re: #2? Thanks!

@garmeeh
Copy link
Author

garmeeh commented Aug 27, 2018

Hi @svarlamov sorry about the delay in replying.

I'm working with @woppers to try resolve #2.

In regards to my original issue, the only chagne we had to make to keycloak-passport was to change this line

this.name = 'Keycloak';

to

this.name = 'keycloak';

I'm pretty sure this is something we could open a PR for on next-auth to add an option to not .toLowerCase() the provider name option. If we get the flow working I will add comment back here for anyone finding the issue later. I would be happy to consider this issue closed if that suits you.

@svarlamov
Copy link
Member

I see... I'm concerned that mainlining a name change might break other implementations. Is there a particular reason why it needs to be lowercase for next auth?

@garmeeh
Copy link
Author

garmeeh commented Aug 28, 2018

I agree, making that change would probably break other implementations. I am not sure if there was a particular reason for the lowercase, but I would hope that I could open a PR for next-auth and add an option to disable the lowercase.

@svarlamov
Copy link
Member

What is that name actually used for in next-auth?

@aol-nnov
Copy link

aol-nnov commented Sep 6, 2018

@svarlamov seems they pick a strategy by name and they get it from url /auth/oauth/<strategyName>

not sure why they need .toLowerCase() though...

@svarlamov
Copy link
Member

@aol-nnov Thanks for clarifying the use case in next-auth. I'm not sure what specifically I can add here, but if we get clarity on the requirements for compatibility with next-auth I would be happy to mainline the changes so long as they don't break other impls

@aol-nnov
Copy link

aol-nnov commented Sep 7, 2018

Anyway, I've opened a PR on that, because no rules enforcing strategy name to be lower case were found.

nextauthjs/next-auth#51

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

No branches or pull requests

3 participants