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

fix redirect after signin #482

Merged
merged 1 commit into from Feb 22, 2023

Conversation

usernaimandrey
Copy link
Contributor

No description provided.

@usernaimandrey
Copy link
Contributor Author

#474

def github
@user = User.from_omniauth(request.env['omniauth.auth'])
I18n.locale = session[:locale] || I18n.default_locale
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему то когда прилетает запрос в контроллер с github меняется локаль на английскую не зависимо от текущей и флеш сообщения выводяися на английском

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А если человек зашел на сайт и потом сразу нажал на войти через гитхаб в сессии разве будет локаль? мне казалось она только при переключении языка соханяется

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ещё здесь но при условии что её в параметрах нет https://github.com/Hexlet/hexlet-cv/blob/main/app/controllers/web/application_controller.rb#L48

@grozwalker grozwalker merged commit d318415 into Hexlet:main Feb 22, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants