Skip to main content

SSOService

SSO service can be used in the following way:
1. Import the service from our library:

import {SSOService} from "@selfcommunity/api-services";
2. Create a function and put the service inside it!
The async function `SignUp` will return the user registration data. It takes the username and ext_id obj as body params.

async SignUp() {
const data = {username: 'string', ext_id: 'number'};
return await SSOService.SignUp(data);
}
If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).

1. Declare it(or declare them, it is possible to add multiple params)

const headers = headers: {Authorization: `Bearer ${yourToken}`}

2. Add it inside the brackets and pass it to the function, as shown in the previous example!

Constructors

new SSOService()

new SSOService(): SSOService

Returns

SSOService

Methods

SignIn()

static SignIn(config?): Promise<SSOSignInType>

Parameters

ParameterType
config?AxiosRequestConfig<any>

Returns

Promise<SSOSignInType>

Source

services/sso/index.ts:65


SignUp()

static SignUp(data, config?): Promise<SSOSignUpType>

Parameters

ParameterType
dataSSOSignUpParams
config?AxiosRequestConfig<any>

Returns

Promise<SSOSignUpType>

Source

services/sso/index.ts:68