1. Packages
  2. Propelauth Provider
  3. API Docs
  4. OauthClient
propelauth 0.4.1 published on Friday, Mar 7, 2025 by propelauth

propelauth.OauthClient

Explore with Pulumi AI

Oauth Client Resource. This is for configuring the basic BE API key information in PropelAuth.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as propelauth from "@pulumi/propelauth";

// Create a PropelAuth OAuth client for integrating your application.
const example = new propelauth.OauthClient("example", {
    environment: "Prod",
    redirectUris: ["https://*.example.com/oauth/callback"],
}, {
    dependsOn: [propelauth_custom_domain_verification.my_prod_domain_verification],
});
export const oauthClientIdResult = example.clientId;
export const oauthClientSecretResult = example.clientSecret;
Copy
import pulumi
import pulumi_propelauth as propelauth

# Create a PropelAuth OAuth client for integrating your application.
example = propelauth.OauthClient("example",
    environment="Prod",
    redirect_uris=["https://*.example.com/oauth/callback"],
    opts = pulumi.ResourceOptions(depends_on=[propelauth_custom_domain_verification["my_prod_domain_verification"]]))
pulumi.export("oauthClientIdResult", example.client_id)
pulumi.export("oauthClientSecretResult", example.client_secret)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/propelauth/propelauth"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a PropelAuth OAuth client for integrating your application.
		example, err := propelauth.NewOauthClient(ctx, "example", &propelauth.OauthClientArgs{
			Environment: pulumi.String("Prod"),
			RedirectUris: pulumi.StringArray{
				pulumi.String("https://*.example.com/oauth/callback"),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			propelauth_custom_domain_verification.My_prod_domain_verification,
		}))
		if err != nil {
			return err
		}
		ctx.Export("oauthClientIdResult", example.ClientId)
		ctx.Export("oauthClientSecretResult", example.ClientSecret)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Propelauth = Pulumi.Propelauth;

return await Deployment.RunAsync(() => 
{
    // Create a PropelAuth OAuth client for integrating your application.
    var example = new Propelauth.OauthClient("example", new()
    {
        Environment = "Prod",
        RedirectUris = new[]
        {
            "https://*.example.com/oauth/callback",
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            propelauth_custom_domain_verification.My_prod_domain_verification,
        },
    });

    return new Dictionary<string, object?>
    {
        ["oauthClientIdResult"] = example.ClientId,
        ["oauthClientSecretResult"] = example.ClientSecret,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.propelauth.OauthClient;
import com.pulumi.propelauth.OauthClientArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        // Create a PropelAuth OAuth client for integrating your application.
        var example = new OauthClient("example", OauthClientArgs.builder()
            .environment("Prod")
            .redirectUris("https://*.example.com/oauth/callback")
            .build(), CustomResourceOptions.builder()
                .dependsOn(propelauth_custom_domain_verification.my_prod_domain_verification())
                .build());

        ctx.export("oauthClientIdResult", example.clientId());
        ctx.export("oauthClientSecretResult", example.clientSecret());
    }
}
Copy
resources:
  # Create a PropelAuth OAuth client for integrating your application.
  example:
    type: propelauth:OauthClient
    properties:
      environment: Prod
      redirectUris:
        - https://*.example.com/oauth/callback
    options:
      dependsOn:
        - ${propelauth_custom_domain_verification.my_prod_domain_verification}
outputs:
  oauthClientIdResult: ${example.clientId}
  oauthClientSecretResult: ${example.clientSecret}
Copy

Create OauthClient Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new OauthClient(name: string, args: OauthClientArgs, opts?: CustomResourceOptions);
@overload
def OauthClient(resource_name: str,
                args: OauthClientArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def OauthClient(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                environment: Optional[str] = None,
                redirect_uris: Optional[Sequence[str]] = None)
func NewOauthClient(ctx *Context, name string, args OauthClientArgs, opts ...ResourceOption) (*OauthClient, error)
public OauthClient(string name, OauthClientArgs args, CustomResourceOptions? opts = null)
public OauthClient(String name, OauthClientArgs args)
public OauthClient(String name, OauthClientArgs args, CustomResourceOptions options)
type: propelauth:OauthClient
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. OauthClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. OauthClientArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. OauthClientArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. OauthClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. OauthClientArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var oauthClientResource = new Propelauth.OauthClient("oauthClientResource", new()
{
    Environment = "string",
    RedirectUris = new[]
    {
        "string",
    },
});
Copy
example, err := propelauth.NewOauthClient(ctx, "oauthClientResource", &propelauth.OauthClientArgs{
Environment: pulumi.String("string"),
RedirectUris: pulumi.StringArray{
pulumi.String("string"),
},
})
Copy
var oauthClientResource = new OauthClient("oauthClientResource", OauthClientArgs.builder()
    .environment("string")
    .redirectUris("string")
    .build());
Copy
oauth_client_resource = propelauth.OauthClient("oauthClientResource",
    environment="string",
    redirect_uris=["string"])
Copy
const oauthClientResource = new propelauth.OauthClient("oauthClientResource", {
    environment: "string",
    redirectUris: ["string"],
});
Copy
type: propelauth:OauthClient
properties:
    environment: string
    redirectUris:
        - string
Copy

OauthClient Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The OauthClient resource accepts the following input properties:

Environment This property is required. string
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
RedirectUris This property is required. List<string>
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
Environment This property is required. string
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
RedirectUris This property is required. []string
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
environment This property is required. String
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
redirectUris This property is required. List<String>
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
environment This property is required. string
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
redirectUris This property is required. string[]
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
environment This property is required. str
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
redirect_uris This property is required. Sequence[str]
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
environment This property is required. String
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
redirectUris This property is required. List<String>
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.

Outputs

All input properties are implicitly available as output properties. Additionally, the OauthClient resource produces the following output properties:

ClientId string
The client ID set by PropelAuth.
ClientSecret string
The client secret set by PropelAuth.
Id string
The provider-assigned unique ID for this managed resource.
ClientId string
The client ID set by PropelAuth.
ClientSecret string
The client secret set by PropelAuth.
Id string
The provider-assigned unique ID for this managed resource.
clientId String
The client ID set by PropelAuth.
clientSecret String
The client secret set by PropelAuth.
id String
The provider-assigned unique ID for this managed resource.
clientId string
The client ID set by PropelAuth.
clientSecret string
The client secret set by PropelAuth.
id string
The provider-assigned unique ID for this managed resource.
client_id str
The client ID set by PropelAuth.
client_secret str
The client secret set by PropelAuth.
id str
The provider-assigned unique ID for this managed resource.
clientId String
The client ID set by PropelAuth.
clientSecret String
The client secret set by PropelAuth.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing OauthClient Resource

Get an existing OauthClient resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: OauthClientState, opts?: CustomResourceOptions): OauthClient
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        client_id: Optional[str] = None,
        client_secret: Optional[str] = None,
        environment: Optional[str] = None,
        redirect_uris: Optional[Sequence[str]] = None) -> OauthClient
func GetOauthClient(ctx *Context, name string, id IDInput, state *OauthClientState, opts ...ResourceOption) (*OauthClient, error)
public static OauthClient Get(string name, Input<string> id, OauthClientState? state, CustomResourceOptions? opts = null)
public static OauthClient get(String name, Output<String> id, OauthClientState state, CustomResourceOptions options)
resources:  _:    type: propelauth:OauthClient    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ClientId string
The client ID set by PropelAuth.
ClientSecret string
The client secret set by PropelAuth.
Environment string
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
RedirectUris List<string>
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
ClientId string
The client ID set by PropelAuth.
ClientSecret string
The client secret set by PropelAuth.
Environment string
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
RedirectUris []string
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
clientId String
The client ID set by PropelAuth.
clientSecret String
The client secret set by PropelAuth.
environment String
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
redirectUris List<String>
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
clientId string
The client ID set by PropelAuth.
clientSecret string
The client secret set by PropelAuth.
environment string
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
redirectUris string[]
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
client_id str
The client ID set by PropelAuth.
client_secret str
The client secret set by PropelAuth.
environment str
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
redirect_uris Sequence[str]
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.
clientId String
The client ID set by PropelAuth.
clientSecret String
The client secret set by PropelAuth.
environment String
The environment for which you are integrating. Accepted values are Test, Staging, and Prod.
redirectUris List<String>
A list of redirect URIs that are whitelisted for this client. Must be a valid URL including a scheme and hostname. You may specify a wildcard (*) in the hostname to allow any subdomain.

Package Details

Repository
propelauth propelauth/terraform-provider-propelauth
License
Notes
This Pulumi package is based on the propelauth Terraform Provider.