UNPKG

@shogun-sdk/accounts

Version:

Shogun with Turnkey: configs, encryption, authentication with Telegram/Turnkey OIDC, etc.

13 lines (10 loc) 341 B
import { TelegramUser } from '../types/turnkey.js'; import axios from 'axios'; async function getTelegramOIDCToken(apiDomain: string, user: TelegramUser, nonce: string) { const { data } = await axios.post<{ id_token: string }>(`${apiDomain}/oauth/telegram`, { user, nonce, }); return data; } export { getTelegramOIDCToken };