Table of Contents

Class OAuthFlows

Namespace
Amazon.CDK.AWS.Cognito
Assembly
Amazon.CDK.AWS.Cognito.dll

Types of OAuth grant flows.

public class OAuthFlows : IOAuthFlows
Inheritance
OAuthFlows
Implements
Inherited Members

Examples

var userpool = new UserPool(this, "UserPool", new UserPoolProps { });
             var client = userpool.AddClient("Client", new UserPoolClientOptions {
                 // ...
                 OAuth = new OAuthSettings {
                     Flows = new OAuthFlows {
                         ImplicitCodeGrant = true
                     },
                     CallbackUrls = new [] { "https://myapp.com/home", "https://myapp.com/users" }
                 }
             });
             var domain = userpool.AddDomain("Domain", new UserPoolDomainOptions { });
             var signInUrl = domain.SignInUrl(client, new SignInUrlOptions {
                 RedirectUri = "https://myapp.com/home"
             });

Remarks

See: - the 'Allowed OAuth Flows' section at https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-idp-settings.html

ExampleMetadata: infused

Constructors

OAuthFlows()

public OAuthFlows()

Properties

AuthorizationCodeGrant

Initiate an authorization code grant flow, which provides an authorization code as the response.

public bool? AuthorizationCodeGrant { get; set; }

Property Value

bool?

Remarks

Default: false

ClientCredentials

Client should get the access token and ID token from the token endpoint using a combination of client and client_secret.

public bool? ClientCredentials { get; set; }

Property Value

bool?

Remarks

Default: false

ImplicitCodeGrant

The client should get the access token and ID token directly.

public bool? ImplicitCodeGrant { get; set; }

Property Value

bool?

Remarks

Default: false