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

Retrieve the state param (Chainlit + Azure auth + passing params to webapp) #1873

Open
martrdev opened this issue Feb 7, 2025 · 1 comment
Labels
auth Pertaining to authentication.

Comments

@martrdev
Copy link

martrdev commented Feb 7, 2025

Hi.

I'm trying to integrate the Azure authentication in my code but I have problems retrieving the state param of the MS login auth.
The idea was to call the chainlit webapp and to pass it some parameters via the url in this way:
www.mydomain.com/?arg1=<value>
but it turn out this is not really a feasible way because it would mean using wildcards in the redirected url which compromises security.

As described in the (MS documentation) the preferred way is to pass any type of custom argument via a state param.

How would I retrieve this state param from the chainlit side? I did explore the server.py file and it seems the state param is set on random, which I suppose makes it impossible for us to retrieve it using the chainlit API (?).

Please if you have any idea to solve this let me know.

PS: please let me know if there's any way to pass parameters to the chainlit webapp which are not mentioned above I am not aware of. Maybe there's an easier way to do this which does not involve the authentication process?

@martrdev martrdev changed the title Retrieve the state param from the MS auth Retrieve the state param f(Azure auth Feb 7, 2025
@martrdev martrdev changed the title Retrieve the state param f(Azure auth Retrieve the state param (Chainlit + Azure auth) Feb 7, 2025
@dosubot dosubot bot added the auth Pertaining to authentication. label Feb 7, 2025
@martrdev martrdev changed the title Retrieve the state param (Chainlit + Azure auth) Retrieve the state param (Chainlit + Azure auth + passing params to webapp) Feb 7, 2025
@puppetm4st3r
Copy link

@martrdev do you solved?

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

No branches or pull requests

2 participants