DEV Community

Discussion on: Social(github) authentication with Firebase and Nuxt

Collapse
 
seriouslee13 profile image
SeriousLee13

And this works without issue for you? When I try to do .getRedirectResult() in the created() hook the whole thing bombs out with:

[t [Error]: This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.] {                       14:42:15  
  code: 'auth/operation-not-supported-in-this-environment',
  a: null
}
Enter fullscreen mode Exit fullscreen mode

It even kills the server! I've done some research and found out that firebase's auth module can only be used in the browser and so this is expected behaviour coz we're trying to call it on the server. Which is what's got me wondering how you managed to pull it off? 🤔

I realize this is quite an old post by now (in javascript years, at least lol) - now we use this.$fire.auth.getRedirectResult() and $fireAuth doesn't exist anymore, but I'd appreciate any insight into this issue.