Skip to content
Snippets Groups Projects
Commit 7564c190 authored by ale's avatar ale
Browse files

Verify that the token from Exchange is valid

parent 468c860f
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -156,6 +156,11 @@ func (b *backendHandler) handleCallback(w http.ResponseWriter, r *http.Request)
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
if !token.Valid() {
log.Printf("Received an invalid token from Exchange()")
http.Error(w, "Invalid token", http.StatusBadRequest)
return
}
// Extract the ID token and store it in our session.
rawIDToken := token.Extra("id_token").(string)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment