Skip to content

Commit

Permalink
feat(platforms): adds coinbase config files
Browse files Browse the repository at this point in the history
  • Loading branch information
aminah-io committed Mar 29, 2023
1 parent fc9cf37 commit 2cc82e5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
21 changes: 21 additions & 0 deletions platforms/src/Coinbase/App-Bindings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { PlatformOptions } from "../types";
import { Platform } from "../utils/platform";
export class CoinbasePlatform extends Platform {
platformId = "Coinbase";
path = "coinbase";
clientId: string = null;
redirectUri: string = null;

constructor(options: PlatformOptions = {}) {
super();
this.clientId = options.clientId as string;
this.redirectUri = options.redirectUri as string;
}

async getOAuthUrl(state: string): Promise<string> {
const coinbasebUrl = await Promise.resolve(
`https://www.coinbase.com/oauth/authorize?response_type=code&client_id=${this.clientId}&redirect_uri=${this.redirectUri}&state=${state}`
);
return coinbasebUrl;
}
}
16 changes: 16 additions & 0 deletions platforms/src/Coinbase/Providers-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { PlatformSpec, PlatformGroupSpec } from "../types";

export const CoinbasePlatformDetails: PlatformSpec = {
icon: "./assets/coinbaseStampIcon.svg",
platform: "Coinbase",
name: "Coinbase",
description: "Connect your existing account to verify with Coinbase.",
connectMessage: "Connect Account",
};

export const CoinbaseProviderConfig: PlatformGroupSpec[] = [
{
platformGroup: "Account Name",
providers: [{ title: "Encrypted", name: "Coinbase" }],
},
];
Empty file.
3 changes: 3 additions & 0 deletions platforms/src/Coinbase/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { CoinbasePlatform } from "./App-Bindings";
export { CoinbaseProviderConfig, CoinbasePlatformDetails } from "./Providers-config";
export { CoinbaseProvider } from "./Providers/coinbase";

0 comments on commit 2cc82e5

Please sign in to comment.