Closed nighttiger1990 closed 4 months ago
@nighttiger1990 we are having this same error, did you find a solution for it?
We're seeing this randomly any one have a fix for this?
Was experiencing this after updating to the newer Google Identity Services JS, our solution was to explicitly set the following scopes, which we were not specifying on the old JS client.
We were requesting access to the Analytics API and Search Console API but the old client would just send over whatever was needed while the new client we had to set the following scopes for it to work again.
await window.google.accounts.oauth2.initCodeClient({
client_id: secret,
scope:
'email profile https://www.googleapis.com/auth/analytics.readonly https://www.googleapis.com/auth/webmasters.readonly openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email',
callback: (response) => {
...
},
});
did you find a solution for it?
This was happening to me, make sure you are returning your user
in this case staff
at the end of your from_omniauth function.
def self.from_omniauth(access_token)
data = access_token.info
Rails.logger.info "emails: #{data["email"]}"
user = User.where(email: data["email"]).first
unless user
company = Company.create(name: "Default Company")
# Uncomment the section below if you want users to be created if they don't exist
user ||= User.create(
name: data["name"],
company_id: company.id,
email: data["email"],
password: Devise.friendly_token[0, 20],
)
end
user # <------ LIKE THIS
end
Closing due to inactivity. Feel free to reopen if you are still having issues.
When I develop local all work perfectly, but when deploy on docker I got this error. Can you help me resolved this
This is docker file
My gem file
This is config in devise.rb
This my
OmniauthCallbacksController