setting string containing multi-byte characters (e.g. Japanese) as a session.create argument will result in the following message: "Error Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range." error occurs.
blitz new xxxxxsession.create in the auth module to include a multi-byte string. Error Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range.
macOS Catalina | darwin-x64 | Node: v12.18.0
blitz: 0.25.0 (local)
Package manager: yarn
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 401.34 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.0 - ~/.nodebrew/current/bin/node
Yarn: 1.22.10 - ~/.nodebrew/current/bin/yarn
npm: 6.14.4 - ~/.nodebrew/current/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
npmPackages:
@prisma/cli: 2.11.0 => 2.11.0
@prisma/client: 2.11.0 => 2.11.0
blitz: 0.25.0 => 0.25.0
react: 0.0.0-experimental-4ead6b530 => 0.0.0-experimental-4ead6b530
react-dom: 0.0.0-experimental-4ead6b530 => 0.0.0-experimental-4ead6b530
typescript: 4.0.5 => 4.0.5
Thanks for raising this issue. I believe the issue is at the btoa call sites in https://github.com/blitz-js/blitz/blob/canary/packages/server/src/supertokens.ts
We're using the https://www.npmjs.com/package/b64-lite library so the docs should be useful.
Most helpful comment
Thanks for raising this issue. I believe the issue is at the
btoacall sites in https://github.com/blitz-js/blitz/blob/canary/packages/server/src/supertokens.tsWe're using the https://www.npmjs.com/package/b64-lite library so the docs should be useful.