How to use the @tanker/core.toBase64 function in @tanker/core

To help you get started, we’ve selected a few @tanker/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TankerHQ / sdk-js / packages / functional-tests / src / verification.js View on Github external
it('works', async () => {
          const appId = toBase64(args.appHelper.appId);
          const url = `${tankerUrl}/verification/email/code`;
          const body = {
            email: 'bob@tanker.io',
            app_id: appId,
            auth_token: args.appHelper.authToken
          };
          const response = await fetch(url, {
            method: 'POST',
            headers: {
              'Content-Type': 'application/json',
            },
            body: JSON.stringify(body),
          });
          expect(response.status).to.eq(200);
          const res = await response.json();
          const verificationCode = res.verification_code;