add missing code during license change

This commit is contained in:
Harshavardhana
2021-04-23 15:04:22 -07:00
parent cbfdf97abf
commit 93cdecaadd
3 changed files with 297 additions and 31361 deletions

View File

@@ -17,3 +17,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
export const OPEN_ID_NONCE_KEY = 'openIDKey'
export const buildOpenIDAuthURL = (authEp, authScopes, redirectURI, clientID, nonce) => {
const params = new URLSearchParams()
params.set("response_type", "id_token")
params.set("scope", authScopes.join(" "))
params.set("client_id", clientID)
params.set("redirect_uri", redirectURI)
params.set("nonce", nonce)
return `${authEp}?${params.toString()}`
}