Use Cloudflare Worker for Google sign in?

Hi Guys …
I have generated credentials ( client id and secret id ) for google oauth2.
I have searched a way to do authentication via goggle on Cloudflare worker … but no result !!

Cloudflare worker doesn’t support google api or passport ( as I think after searching )
and there is no oauth2 lib supported on Clourdflare Worker either.

there are a lot of old questions about this , but no answers

anyone please could share a code for google sign in ?

or it’s not possible ?

thanks …

There’s a community member who made a lib for doing OAuth in Workers. Just checked and it supports Google. You can find it here: GitHub - subhendukundu/worker-auth-providers: worker-auth-providers is an open-source providers to make authentication easy with workers. Very lightweight script which doesn't need a lot of dependencies. Plug it with any framework or template of workers.

1 Like

Please don’t spread wrong information… the only way a Worker is getting “hacked” is if your account security is very poor and they get into it. You should be using a secure, random password along with 2FA.

There’s no command to type into the console and listen to some isolates traffic and decrypt it

There are many customers (including some pretty big ones) using Workers for sensitive things, it’s ok to do so.

2 Likes