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,33 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
export const SET = "alert/SET"
export const CLEAR = "alert/CLEAR"
export let alertId = 0
export const set = alert => {
const id = alertId++
return (dispatch, getState) => {
if (alert.type !== "danger" || alert.autoClear) {
setTimeout(() => {
dispatch({
type: CLEAR,
alert: {
id
}
})
}, 5000)
}
dispatch({
type: SET,
alert: Object.assign({}, alert, {
id
})
})
}
}
export const clear = () => {
return { type: CLEAR }
}

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()}`
}

31616
browser/package-lock.json generated

File diff suppressed because it is too large Load diff