Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Login gives "This browser or app may not be secure"

I am testing my local app on https://localhost:44367/ using Chrome for google login.

My app is Angular 6 using .Net core

When i try to login using my credentials, it gives Error saying

Couldn't sign you in This browser or app may not be secure. Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in.

This used to work locally but it stopped working as of today.

Please help me

thanks

like image 207
Ted Lee Avatar asked Dec 24 '19 05:12

Ted Lee


1 Answers

I've tried a lot of methods but only one worked for me. I was working with react.js and electron.js with firebase authentication then i get the same problem. This is what i did to solve my problem.

electron.app.on("ready", ()=>{
  session.defaultSession.webRequest.onBeforeSendHeaders((details, callback)=>{
  details.requestHeaders["User-Agent"] = "Chrome",
  callback({cancel: false, requestHeaders: details.requestHeaders})
 })
  createWindow()
})

Alternatively You can also try this pass the userAgent value to Chrome when loading the URL as follows.

window.loadURL('/path/to/your/index.html`,  {userAgent: "Chrome"})

Good Luck ✔✔✨✨

like image 188
crispengari Avatar answered Nov 13 '22 23:11

crispengari