UNPKG

@privy-io/js-sdk-core

Version:

Vanilla JS client for the Privy Auth API

2 lines (1 loc) 402 B
import{linkWithCrossAppAuth as r}from"../../linkWithCrossAppAuth.mjs";import"../../../../Error.mjs";const e=({client:e,openAuthSession:o})=>{let t=r({client:e,openAuthSession:o});return async({providerAppId:r,redirectUrl:o})=>await e.crossApp.getProviderAccessToken(r)||(await t({providerAppId:r,redirectUrl:o}),await e.crossApp.getProviderAccessToken(r))};export{e as getProviderAccessTokenOrRelink};