1

when the below request comes to my provider, the provider should generate the code and send it back how can I generate this code in asp.net c# .

client_id=11111
response_type=code
scope= 
redirect 
state=state-22222

response :
Code:?

Community
  • 1
  • 1

1 Answers1

1
  1. You need to initialize the authorise request with these parameters in the browser.

Here is the sample request

https://<is-domain>:<id-host>/oauth2/authorize?response_type=code&client_id=<client-id>&redirect_uri=<redirect-uri>&scope=<scope>&state=<state>

You can refer this to open a browser from your C# application.

  1. Then the user has to complete the authentication flow and approve the consent.
  2. Then code will be sent back as a query parameter to the call back URL you have defined. From that, you can get the code
senthalan
  • 1,936
  • 3
  • 10
  • 19