Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lukasjhan/furo-sdk-ts
- Owner: lukasjhan
- Created: 2023-04-30T01:38:18.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-04-30T01:38:30.000Z (over 1 year ago)
- Last Synced: 2024-10-24T08:52:19.203Z (2 months ago)
- Language: TypeScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 |