UNPKG

asteroid-oauth-mixin

Version:
12 lines (11 loc) 408 B
export default function getOauthState (credentialToken) { const state = { loginStyle: "popup", credentialToken, isCordova: false }; // Encode base64 as not all login services URI-encode the state // parameter when they pass it back to us. // TODO: document to include a btoa/atob polyfill to support older browsers return window.btoa(JSON.stringify(state)); }