Issues with oAuth2


  • Container running on Google Cloud Run
  • MongoDB Storage (node-red-mongo-storage-plugin)
  • AdminAuth with passport-google-oauth20

I have two issues and I believe that they're related.

** Issue 1 **
When I login with passport everything is fine but randomly it seems the session expires. For instance I can click on "Deploy" and sometimes an error saying not authorized to deploy.

** Issue 2 **
I'm using node-red-contrib-google-calendar for calendar integration with relies on oAuth2. However, it seems like when my first issue happens my Google Calendar nodes are no longer able to access the credentials. I have to delete the credentials and then readd them to be able to access the calendar again.

Here is my adminAuth config:

adminAuth: {
	type: "strategy",
	strategy: {
	  name: "google",
	  label: 'Sign in with Google',
	  icon: "fa-google",
	  strategy: require('passport-google-oauth20').Strategy,
	  options: {
		response_type: "code",
		project_id: "REDACTED",
		prompt: "consent",
		auth_uri: "",
		token_uri: "",
		auth_provider_x509_cert_url: "",
		clientID: 'REDACTED',
		clientSecret: 'REDACTED',
		scope: 'email',
		callbackURL: "",
		accessType: 'offline',
		token_uri: "",
		auth_provider_x509_cert_url: "",
		redirect_uris: "", 
		javascript_origins: "",
		client_secret: "REDACTED",
		verify: function(token, tokenSecret, profile, done) {
			profile.username = profile.emails.find(x => x.verified).value;
			done(null, profile);
	users: function (username) {
	  return Promise.resolve({
		username: username,
		permissions: "*"

Not quite sure what's goin on here.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.