Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication failure! no implicit conversion of String into Array: TypeError, no implicit conversion of String into Array #105

Open
AhlOct opened this issue Feb 17, 2023 · 0 comments

Comments

@AhlOct
Copy link

AhlOct commented Feb 17, 2023

I can successfully authenticate with apple, but then the callback fails with the following error:

(apple) Request phase initiated.
Started POST "/api/users/auth/apple/callback" for 114.125.77.150 at 2023-02-17 12:13:04 +0700
Cannot render console from 114.125.77.150! Allowed networks: 127.0.0.0/127.255.255.255, ::1
(apple) Callback phase initiated.
(apple) Authentication failure! no implicit conversion of String into Array: TypeError, no implicit conversion of String into Array
Processing by Users::OmniauthCallbacksController#failure as HTML
Parameters: {"state"=>"59267181a968b7e95a8b940649ea747aee9168b2666c668a", "code"=>"[FILTERED]"}

My controller for omniauth callback like this:

def apple
@user = User.from_omniauth(request.env['omniauth.auth'])
if @user.persisted?
sign_in_and_redirect @user, event: :authentication
set_flash_message(:notice, :success, kind: 'apple') if is_navigational_format?
else
session['devise.apple_data'] = request.env['omniauth.auth'].except(:extra)
redirect_to new_user_registation_url
end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant