Commit 5814f235 authored by Matija Obreza's avatar Matija Obreza
Browse files

Fix: Google login requires its clientId

parent d6d7598a
......@@ -62,8 +62,9 @@ export class LoginService {
});
}
public static verifyGoogleToken(tokenId) {
public static verifyGoogleToken(googleClientId: string, tokenId) {
const form = new FormData();
form.append('clientId', googleClientId);
form.append('tokenId', tokenId);
return axiosBackend.post(VERIFY_GOOGLE_TOKEN_URL, form)
......
......@@ -62,8 +62,8 @@ export const verifyGoogleToken = (payload) => {
};
export const verifyGoogleTokenRequest = (tokenId) => (dispatch, getState) => {
return LoginService.verifyGoogleToken(tokenId)
const googleClientId = getState().applicationConfig.googleClientId;
return LoginService.verifyGoogleToken(googleClientId, tokenId)
.then((data) => {
saveCookies(data, data.exp * 1000 || new Date().getTime() + data.expires_in * 1000);
return dispatch(loginApp(data));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment