diff --git a/webapp/src/components/GLoginButton.tsx b/webapp/src/components/GLoginButton.tsx index c6e984f..4872e23 100644 --- a/webapp/src/components/GLoginButton.tsx +++ b/webapp/src/components/GLoginButton.tsx @@ -9,6 +9,19 @@ const GLoginButton = () => { const onSuccess = (response: any) => { console.log( "LOGIN SUCCESS! Current User: ",response.profileObject); // handle successful login"" + var authResponse = response.getAuthResponse(); + var accessToken = authResponse.access_token; + + //Validations in backend should be done + + // Obtener el perfil del usuario + var profile = accessToken.getBasicProfile(); + + // Obtener el email del usuario + var email = profile.getEmail(); + console.log(email); + //send email to backend + }; const onFailure = (error: any) => { @@ -16,6 +29,9 @@ const GLoginButton = () => { // handle failed login }; + + + return (