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

adding manifest property for token url configs #198

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .slack/apps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file.

8 changes: 8 additions & 0 deletions src/providers/oauth2/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export type OAuth2ProviderIdentitySchema = {
};
};

export type tokenUrlConfigSchema = {
"use_basic_authentication_scheme"?: boolean;
Copy link
Contributor

@filmaj filmaj Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a JSdoc here to explain what this is used for. The tech spec mentioned a default value - let's make sure to document that default value here too.

};

export type OAuth2ProviderOptions = {
/** Client id for your provider */
"client_id": string;
Expand All @@ -19,10 +23,14 @@ export type OAuth2ProviderOptions = {
"authorization_url"?: string;
/** Token url for your provider. Required for CUSTOM provider types. */
"token_url"?: string;
/** Optional configs for token url. Required for CUSTOM provider types. */
"token_url_config"?: tokenUrlConfigSchema;
/** Identity configuration for your provider. Required for CUSTOM provider types. */
"identity_config"?: OAuth2ProviderIdentitySchema;
/** Optional extras dict for authorization url for your provider. Required for CUSTOM provider types. */
"authorization_url_extras"?: { [key: string]: string };
/** Optional boolean flag to specify if the provider requires PKCE. Required for CUSTOM provider types. */
"use_pkce"?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also document the default value of this field if not specified.

};

export type OAuth2ProviderDefinitionArgs = {
Expand Down