Add OAuth2 authentication (#147)

- Added Site settings > Authentication section
- Create/edit/delete your custom oauth2 configurations
- Login or signup with oauth2
This commit is contained in:
Riccardo Graziosi
2022-08-05 18:15:17 +02:00
committed by GitHub
parent 3bda6dee08
commit 4c73b398e8
65 changed files with 2096 additions and 129 deletions

View File

@@ -1,13 +1,17 @@
en:
errors:
unknown: 'An unknown error occurred'
unauthorized: 'You are not authorized'
not_logged_in: 'You must be logged in to access this page'
not_enough_privileges: 'You do not have the privilegies to access this page'
user_blocked_or_deleted: 'You cannot access your account because it has been blocked or deleted.'
o_auth_login_error: 'There was an error logging in with %{name}. Please contact the site administrator or try a different provider.'
board:
update_order: 'There was an error in reordering boards'
post_status:
update_order: 'There was an error in reordering statuses'
defaults:
user_full_name: 'Anonymous User'
mailers:
devise:
welcome_greeting: 'Welcome to %{site_name}, %{email}!'
@@ -60,6 +64,18 @@ en:
like:
user_id: 'User'
post_id: 'Post'
o_auth:
name: 'Name'
logo: 'Logo'
is_enabled: 'Enabled'
client_id: 'Client ID'
client_secret: 'Client secret'
authorize_url: 'Authorize URL'
token_url: 'Token URL'
profile_url: 'Profile URL'
scope: 'Scope'
json_user_name_path: 'JSON path to user name'
json_user_email_path: 'JSON path to user email'
post_status:
name: 'Name'
color: 'Color'
@@ -71,9 +87,17 @@ en:
board_id: 'Post board'
user_id: 'Post author'
post_status_id: 'Post status'
tenant:
site_name: 'Site name'
site_logo: 'Site logo'
subdomain: 'Subdomain'
locale: 'Language'
brand_setting: 'Display'
user:
email: 'Email'
full_name: 'Name and surname'
full_name: 'Full name'
password: 'Password'
password_confirmation: 'Password confirmation'
role: 'Role'
notifications_enabled: 'Notifications enabled'
errors:
@@ -83,4 +107,4 @@ en:
blank: 'cannot be blank'
taken: 'is already in use'
too_short: 'is too short (minimum %{count} characters)'
too_long: 'is too long (maximum ${count} characters)'
too_long: 'is too long (maximum %{count} characters)'

View File

@@ -1,5 +1,11 @@
en:
common:
validations:
required: '%{attribute} is required'
email: 'Invalid email'
url: 'Invalid URL'
password: 'Password must have at least %{n} characters'
password_mismatch: 'Password and password confirmation must match'
forms:
auth:
email: 'Email'
@@ -14,6 +20,8 @@ en:
remember_me: 'Remember me'
log_in: 'Log in'
sign_up: 'Sign up'
log_in_with: 'Log in with %{o_auth}'
sign_up_with: 'Sign up with %{o_auth}'
profile_settings: 'Profile settings'
update_profile: 'Update profile'
cancel_account: 'Cancel account'
@@ -31,14 +39,20 @@ en:
no_status: 'No status'
loading: 'Loading...'
confirmation: 'Are you sure?'
unsaved_changes: 'Unsaved changes will be lost if you leave the page.'
edited: 'Edited'
enabled: 'Enabled'
disabled: 'Disabled'
copied: 'Copied!'
buttons:
new: 'New'
edit: 'Edit'
delete: 'Delete'
cancel: 'Cancel'
create: 'Create'
update: 'Save'
confirm: 'Confirm'
back: 'Back'
datetime:
now: 'just now'
minutes:
@@ -55,19 +69,10 @@ en:
step1:
title: '1. Create user account'
email_auth: 'Register with email'
validations:
full_name: 'Full name is required'
email: 'Email is invalid'
password: 'Password must have at least %{n} characters'
password_mismatch: 'Password and password confirmation must match'
step2:
title: '2. Create feedback space'
site_name: 'Site name'
subdomain: 'Subdomain'
create_button: 'Create feedback space'
validations:
site_name: 'Site name is required'
subdomain: 'Subdomain is required'
subdomain_already_taken: 'Sorry, this subdomain is not available'
step3:
title: "You're almost done!"
@@ -136,22 +141,17 @@ en:
post_statuses: 'Statuses'
roadmap: 'Roadmap'
users: 'Users'
authentication: 'Authentication'
info_box:
up_to_date: 'All changes saved'
error: 'An error occurred: %{message}'
dirty: 'Changes not saved'
general:
title: 'General'
site_name: 'Site name'
site_logo: 'Site logo'
brand_setting: 'Display'
brand_setting_both: 'Both name and logo'
brand_setting_name: 'Name only'
brand_setting_logo: 'Logo only'
brand_setting_none: 'None'
locale: 'Language'
validations:
site_name: 'Site name is required'
boards:
title: 'Boards'
empty: 'There are no boards. Create one below!'
@@ -182,4 +182,22 @@ en:
role_admin: 'Administrator'
status_active: 'Active'
status_blocked: 'Blocked'
status_deleted: 'Deleted'
status_deleted: 'Deleted'
authentication:
title: 'Authentication'
oauth_subtitle: 'OAuth providers'
copy_url: 'Copy URL'
test_page:
title: '%{name} OAuth test results'
fetched_user_data: 'Fetched user data'
found: 'Found'
summary: 'Summary'
valid_configuration: 'This OAuth provider is configured correctly!'
warning_configuration: 'This OAuth provider if configured correctly, but a default name for users (%{name}) will be used.'
invalid_configuration: 'This OAuth provider is NOT configured correctly.'
form:
title_new: 'New OAuth provider'
title_edit: 'Edit OAuth provider'
subtitle_oauth_config: 'OAuth configuration'
subtitle_user_profile_config: 'User profile configuration'
client_secret_help: 'hidden for security purposes'