Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Latest commit

 

History

History
88 lines (54 loc) · 2.59 KB

OAuthApi.md

File metadata and controls

88 lines (54 loc) · 2.59 KB

@KindeOssReactNativeSdk05x.OAuthApi

All URIs are relative to https://{businessName}.kinde.com/

Method HTTP request Description
getUser GET /oauth2/user_profile Returns the details of the currently logged in user
getUserProfileV2 GET /oauth2/v2/user_profile Returns the details of the currently logged in user

getUser

UserProfile getUser()

Returns the details of the currently logged in user

Contains the id, names and email of the currently logged in user

Example

import @KindeOssReactNativeSdk05x from '@kinde-oss/react-native-sdk-0-5x';
let defaultClient = @KindeOssReactNativeSdk05x.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: kindeBearerAuth
let kindeBearerAuth = defaultClient.authentications['kindeBearerAuth'];
kindeBearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new @KindeOssReactNativeSdk05x.OAuthApi();
const data = await apiInstance.getUser();
console.log('API called successfully. Returned data: ' + data);

Parameters

This endpoint does not need any parameter.

Return type

UserProfile

Authorization

kindeBearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getUserProfileV2

UserProfileV2 getUserProfileV2()

Returns the details of the currently logged in user

Contains the id, names and email of the currently logged in user

Example

import @KindeOssReactNativeSdk05x from '@kinde-oss/react-native-sdk-0-5x';
let defaultClient = @KindeOssReactNativeSdk05x.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: kindeBearerAuth
let kindeBearerAuth = defaultClient.authentications['kindeBearerAuth'];
kindeBearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new @KindeOssReactNativeSdk05x.OAuthApi();
const data = await apiInstance.getUserProfileV2();
console.log('API called successfully. Returned data: ' + data);

Parameters

This endpoint does not need any parameter.

Return type

UserProfileV2

Authorization

kindeBearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json