UNPKG

@auth0/auth0-spa-js

Version:

Auth0 SDK for Single Page Applications using Authorization Code Grant Flow with PKCE

12 lines (10 loc) 255 B
/** * @ignore */ const dedupe = (arr: string[]) => Array.from(new Set(arr)); /** * @ignore */ export const getUniqueScopes = (...scopes: (string | undefined)[]) => { return dedupe(scopes.filter(Boolean).join(' ').trim().split(/\s+/)).join(' '); };