Files
wg-portal/frontend/src/helpers/encoding.js
Arnaud Rocher 6e47d8c3e9 fix: parity of Base64/URL encoding between frontend and backend (#611)
Signed-off-by: Arnaud Rocher <arnaud.roche3@gmail.com>
(cherry picked from commit 5d58df8a19)
2026-01-29 22:39:33 +01:00

7 lines
204 B
JavaScript

export function base64_url_encode(input) {
let output = btoa(input)
output = output.replaceAll('+', '.')
output = output.replaceAll('/', '_')
output = output.replaceAll('=', '-')
return output
}