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

Change scope delimiter string #1008

Closed
tpavlek opened this issue Apr 26, 2019 · 5 comments
Closed

Change scope delimiter string #1008

tpavlek opened this issue Apr 26, 2019 · 5 comments

Comments

@tpavlek
Copy link

tpavlek commented Apr 26, 2019

Currently passport uses a space as the default scope delimiter string, and it doesn't seem possible to change that?

This should be changeable, especially since Socialite uses commas as the default, leading to breakages in compatibility between the two.

@driesvints
Copy link
Member

How does Socialite using comma's break Passport?

@matt-allan
Copy link
Contributor

Not sure about the OP but I can see how that would be an issue.

Let's say you have two Laravel applications. One of them ('server') runs the Passport server. The other ('client') one uses the authorization code grant to allow users to login using the passport server.

On the client it's convenient to use Socialite to login - you can write a custom Socialite provider and then the login code is just Socialite::driver('passport')->redirect(). However if you do this and you want to use scopes you have to override the scopeSeparator property because socialite tries to use , by default and passport uses .

@tpavlek
Copy link
Author

tpavlek commented Apr 29, 2019

Yeah @matt-allan is exactly right here. Socialite tries to use commas, passport uses spaces (and can ONLY use spaces).

That's an incompatibility. Being able to change the scope separator addresses this incompatibility.

@driesvints
Copy link
Member

Can you maybe whip up a small example app that would demonstrate how this works?

@driesvints
Copy link
Member

Imo I don't think it's necessary to provide a setting for this. All the examples I've seen so far with OAuth2 are using spaces. If you can give a clear example why you need this this might be reconsidered.

I also think it's best that we change the default for Socialite to a space.

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

No branches or pull requests

3 participants