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

Is there a way to dynamically add custom parameters in the return url from the client request? #19

Open
fdutey opened this issue Nov 12, 2024 · 3 comments

Comments

@fdutey
Copy link

fdutey commented Nov 12, 2024

Hello

I'm building an app that has multiple oauth providers and different context for oauth. I need a way to pass parameters to the query url that will be passed back in the redirect url to identify where the code is coming from to then query the right adapter.

Ex:

moodle connection URL: http://moodledomain.com/local/oauth/login.php?client_id=EXAMPLE&response_type=code&foo=bar
redirects to http://redirectUrl?code=<token>&foo=bar

(variable used in this example is foo=bar)

That's the way im using with every other oauth implementation, it looks standard.

Thanks in advance

@toniginard
Copy link
Member

 Hi, @fdutey,

We had a similar situation (not the same) and what we did was patch the Moodle core code to change the return URL according to our needs.

Here is our patch: projectestac/agora_moodle2@71a6b48

Best wishes,

@fdutey
Copy link
Author

fdutey commented Nov 12, 2024

Thanks for the answer. Unfortunately i dont have access to the moodle code, im just a consumer, I just know they use this plugin

@toniginard
Copy link
Member

You can try to use the parameter name "loginparams". If it doesn't work, I'm afraid there's no way to do that.

Best wishes,

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

No branches or pull requests

2 participants