Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lukasjhan/furo-sdk-ts

Typescript SDK for Furo
https://github.com/lukasjhan/furo-sdk-ts

Last synced: 12 days ago
JSON representation

Typescript SDK for Furo

Awesome Lists containing this project

README

        


Furo Logo

# Typescript SDK for Furo

Check Furo's [Official Documentation](https://docs.furo.one/react-sdk).

## Overview

```typescript
export interface FuroProviderOptions {
domain: string;
clientId: string;
redirectUri: string;
apiUrl?: string;
}

export interface FuroToken {
access_token: string;
refresh_token: string;
}

export declare class FuroClient {
domain: string;
clientId: string;
redirectURI: string;
api: AxiosInstance;
static DEFAULT_API_BASE_URL: string;
static FURO_AUTH_URL: string;
constructor(options: FuroProviderOptions);
buildAuthorizeUrl(): Promise;
getUser(): Promise;
handleRedirectCallback(url: string): Promise<{
access_token: string;
refresh_token: string;
} | null>;
refreshTokenSilently(
accessToken: string,
refreshToken: string
): Promise;
loginWithKakao(KAKAO_REST_API_KEY: string): Promise;
}

export declare class FuroFrontClient extends FuroClient {
constructor(options: FuroProviderOptions);
loginWithRedirect(): Promise;
handleRedirectCallback(url?: string): Promise<{
access_token: string;
refresh_token: string;
} | null>;
checkSession(): Promise;
refreshTokenSilently(): Promise<{
access_token: string;
refresh_token: string;
} | null>;
logout(): Promise;
loginWithKakao(KAKAO_REST_API_KEY: string): Promise;
}
```

### Parameters

| Name | Type | Description | Required |
| ----------- | ------ | -------------------------------------------------------------------------------------------------- | -------- |
| domain | string | Using loginWithRedirect The login page to redirect to, using the default of https://auth.furo.one. | Yes |
| clientId | string | This is the client identifier assigned when creating the Furo project. | Yes |
| redirectUri | string | This is the uri of the page to go to after login. | Yes |