web/admin/providers/oauth2: add generated defaults for clientId and secret
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import * as base64js from "base64-js";
|
||||
import { hexEncode } from "../../../utils";
|
||||
|
||||
export function b64enc(buf: Uint8Array): string {
|
||||
return base64js.fromByteArray(buf)
|
||||
@ -13,14 +14,6 @@ export function b64RawEnc(buf: Uint8Array): string {
|
||||
.replace(/\//g, "_");
|
||||
}
|
||||
|
||||
export function hexEncode(buf: Uint8Array): string {
|
||||
return Array.from(buf)
|
||||
.map(function (x) {
|
||||
return ("0" + x.toString(16)).substr(-2);
|
||||
})
|
||||
.join("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms items in the credentialCreateOptions generated on the server
|
||||
* into byte arrays expected by the navigator.credentials.create() call
|
||||
|
||||
Reference in New Issue
Block a user