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

Add support for fragment parameters in the reitit-frontend module #554

Merged

Conversation

just-sultanov
Copy link
Contributor

@just-sultanov just-sultanov commented Jun 15, 2022

Hi there!

I ran into a problem when developing a SPA-application (without backend) that in the reitit-frontend is no way to process fragment parameters. I use supabase, google and github as oauth providers, which returns response using fragment parameters.

I need to process the fragment parameters due to the fact that the authorization server returns a callback in the following format: https://example.com/#/oauth/google/callback#access_token=foo&refresh_token=bar&provider_token=baz&token_type=bearer&expires_in=3600

This small PR allows us to process fragment parameters the same way we process query parameters.

I created a custom router to implement the required business logic, but I think it will be useful for the community, and that's why I opened this PR.

Links:

@just-sultanov just-sultanov marked this pull request as ready for review June 19, 2022 06:18
@ikitommi ikitommi merged commit c2c267f into metosin:master Jan 9, 2023
@ikitommi
Copy link
Member

ikitommi commented Jan 9, 2023

Thanks!! and sorry for taking so long.

@Deraen
Copy link
Member

Deraen commented Jan 18, 2023

I'm reverting this PR. "Fragment parameters" don't exist in URIs; instead, they are just one use-case-specific way to encode key-value data in the fragment string used by, e.g., OAuth.

It makes sense to support this, but this implementation is too high-level and tied to one specific way to encode data in fragment string.

I'll check if we include the fragment string in the match, if not, first step is to add that to match and at least then it will be easy to decode it in any way.

Deraen added a commit that referenced this pull request Jan 18, 2023
…agment-parameters"

This reverts commit c2c267f, reversing
changes made to 8087522.
Deraen added a commit that referenced this pull request Jan 18, 2023
…t-for-fragment-parameters""

This reverts commit 4d1b00e.
Deraen added a commit that referenced this pull request Feb 16, 2023
…t-for-fragment-parameters""

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

Successfully merging this pull request may close these issues.

3 participants