Open rathoregee opened 3 years ago
Hi @rathoregee, thanks for the question. I'll inquire internally if this code sample exists and let you know here.
Hi @rathoregee, the flow you want to implement is not recommended. A similar flow would be the clients credentials flow, but instead of username and password you have a clientId and ClientSecret. Here you may find all the flows listed: https://developer.okta.com/docs/guides/implement-grant-type/authcode/main/#grant-type-flow
@andriizhegurov-okta i understand (implement is not recommended). I was writing a integration test, it is helpful there.
do we have any c# code sample for it.
many thanks
@rathoregee we don't have any code samples for not recommended flows unfortunately.
ok- any code for PKCE (Proof Key for Code Exchange) in C# language
@rathoregee no we don't have samples of PKCE flow in C#. But there are several JS resources about Authorization Code with PKCE flow that might be helpful:
Hi Guys I am writing a integration test for aws lamda autoriser for api gateway.
do we have any c# code example to get jwt tokens (id, access) by using (username, passord)
by making c# httpclient call to Okta?
some kind of CURL for example
curl --location --request POST ‘https://org.okta.com/oauth2/v1/token’ –header ‘Accept: application/json’ –header ‘Content-Type: application/x-www-form-urlencoded’ –header ‘Content-Type: application/x-www-form-urlencoded’ –data-urlencode ‘grant_type=password’ –data-urlencode ‘username=test.user’ –data-urlencode ‘password=p@ssw0rd’ –data-urlencode ‘scope=openid’ –data-urlencode ‘client_id={{clientId}}’