Skip to main content

Class: SSOService

services/sso.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

constructor

new SSOService(): SSOService

Returns

SSOService

Methods

SignIn

SignIn(config?): Promise<SSOSignInType>

Parameters

NameType
config?AxiosRequestConfig<any>

Returns

Promise<SSOSignInType>

Defined in

services/sso/index.ts:65


SignUp

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

Parameters

NameType
dataSSOSignUpParams
config?AxiosRequestConfig<any>

Returns

Promise<SSOSignUpType>

Defined in

services/sso/index.ts:68