Files
wg-portal/frontend/src/helpers/encoding.js
Arnaud Rocher 5d58df8a19
Some checks failed
Docker / Build and Push (push) Has been cancelled
github-pages / deploy (push) Has been cancelled
Docker / release (push) Has been cancelled
fix: parity of Base64/URL encoding between frontend and backend (#611)
Signed-off-by: Arnaud Rocher <arnaud.roche3@gmail.com>
2026-01-17 19:38:48 +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
}