Add register via username and refactor email-login to username-login (#313)

* Added config option to enable/disable the email signup

* Added register API call

* Added register button and error handling

* Show register button only if enabled in config

* Renamed login handler, added dir-attribute, removed obsolete css class

* Added separate registration page, changed email-login to internal-login

As an username is sufficient for registration, this commit changes the email-login into an username-based login. This login method is now called "internal" in the code.
This commit also introduces a new registration page instead of using the same form as for login.

* Added information texts below form fields

* Added error differentiation

* Added CHANGELOG entry

* Replace "magic string" with Enum representation

* Removed password-field to DOM rewrite

With the value attribute set, the password would be written to the DOM while typing. That's bad practise as attackers could read that password (e.g. with dirty CSS-hacks).

* Fixed backendConfig to config renaming

* Fixed links on register page being external links

* Refactored error handling to use string-enum that corresponds with i18n keys

* Fix chrome warnings regarding autocomplete and duplicated id

* Refactor login action buttons to use callbacks and handle promises directly

* Remove unnecessary async function

* Added promise chaining
This commit is contained in:
Erik Michelson 2020-08-04 23:13:12 +02:00 committed by GitHub
parent 4054e130bb
commit dbce0181a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 347 additions and 119 deletions

View file

@ -4,6 +4,7 @@ import { ConfigActions, ConfigActionType, SetConfigAction } from './types'
export const initialState: Config = {
allowAnonymous: true,
allowRegister: true,
authProviders: {
facebook: false,
github: false,
@ -14,7 +15,7 @@ export const initialState: Config = {
google: false,
saml: false,
oauth2: false,
email: false,
internal: false,
openid: false
},
branding: {

View file

@ -31,7 +31,7 @@ export enum LoginProvider {
GOOGLE = 'google',
SAML = 'saml',
OAUTH2 = 'oauth2',
EMAIL = 'email',
INTERNAL = 'internal',
LDAP = 'ldap',
OPENID = 'openid'
}