From 4504f09f6e85f09b0489debb547a17209d7176ea Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 3 Aug 2020 18:06:49 +0200 Subject: deal with refresh token in embed --- client/src/root-helpers/utils.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 client/src/root-helpers/utils.ts (limited to 'client/src/root-helpers/utils.ts') diff --git a/client/src/root-helpers/utils.ts b/client/src/root-helpers/utils.ts new file mode 100644 index 000000000..acfb565a3 --- /dev/null +++ b/client/src/root-helpers/utils.ts @@ -0,0 +1,12 @@ +function objectToUrlEncoded (obj: any) { + const str: string[] = [] + for (const key of Object.keys(obj)) { + str.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])) + } + + return str.join('&') +} + +export { + objectToUrlEncoded +} -- cgit v1.2.3