I am new to Ktor and working on creating a oauth functionality, I want to implement Oauth feature but my clientID and SecretKey changes from user to user.
I tried to refer to following official document, but found out that I need to set ClientID and SecretKey during plugin installation. https://ktor.io/docs/oauth.html
Which is not suitable in my case because I need to be able to set ClientID and SecrectID based on user who calls /login.
Any suggestions on how I could achieve it would be appreciated.
The block assigned to the
providerLookupproperty is executed for each call where OAuth2 settings need to be accessed. Also, in the block,thispoints to theApplicationCallobject. So, you can write the logic of obtaining the client credentials from the database there. Here is an example: