diff --git a/client/components/login.vue b/client/components/login.vue
index 650c720f..56295f7b 100644
--- a/client/components/login.vue
+++ b/client/components/login.vue
@@ -106,16 +106,16 @@ export default {
} else {
this.isLoading = true
graphQL.mutate({
- mutation: CONSTANTS.GRAPHQL.GQL_MUTATION_LOGIN,
+ mutation: CONSTANTS.GRAPH.AUTHENTICATION.MUTATION_LOGIN,
variables: {
username: this.username,
password: this.password,
provider: this.selectedStrategy
}
}).then(resp => {
- if (resp.data.login) {
- let respObj = resp.data.login
- if (respObj.succeeded === true) {
+ if (_.has(resp, 'data.authentication.login')) {
+ let respObj = _.get(resp, 'data.authentication.login', {})
+ if (respObj.operation.succeeded === true) {
if (respObj.tfaRequired === true) {
this.screen = 'tfa'
this.securityCode = ''
@@ -132,7 +132,7 @@ export default {
}
this.isLoading = false
} else {
- throw new Error(respObj.message)
+ throw new Error(respObj.operation.message)
}
} else {
throw new Error('Authentication is unavailable.')
@@ -159,15 +159,15 @@ export default {
} else {
this.isLoading = true
graphQL.mutate({
- mutation: CONSTANTS.GRAPHQL.GQL_MUTATION_LOGINTFA,
+ mutation: CONSTANTS.GRAPH.AUTHENTICATION.MUTATION_LOGINTFA,
variables: {
loginToken: this.loginToken,
securityCode: this.securityCode
}
}).then(resp => {
- if (resp.data.loginTFA) {
- let respObj = resp.data.loginTFA
- if (respObj.succeeded === true) {
+ if (_.has(resp, 'data.authentication.loginTFA')) {
+ let respObj = _.get(resp, 'data.authentication.loginTFA', {})
+ if (respObj.operation.succeeded === true) {
this.$store.dispatch('alert', {
style: 'success',
icon: 'gg-check',
@@ -175,7 +175,7 @@ export default {
})
this.isLoading = false
} else {
- throw new Error(respObj.message)
+ throw new Error(respObj.operation.message)
}
} else {
throw new Error('Authentication is unavailable.')
@@ -382,6 +382,10 @@ export default {
}
}
+ em {
+ height: 20px;
+ }
+
span {
font-weight: 600;
diff --git a/client/constants/graphql.js b/client/constants/graphql.js
index f5feec89..40d84c0c 100644
--- a/client/constants/graphql.js
+++ b/client/constants/graphql.js
@@ -33,32 +33,46 @@ export default {
}
}
}
- `
- },
- GQL_QUERY_TRANSLATIONS: gql`
- query($locale: String!, $namespace: String!) {
- translations(locale:$locale, namespace:$namespace) {
- key
- value
+ `,
+ MUTATION_LOGIN: gql`
+ mutation($username: String!, $password: String!, $provider: String!) {
+ authentication {
+ login(username: $username, password: $password, provider: $provider) {
+ operation {
+ succeeded
+ code
+ slug
+ message
+ }
+ tfaRequired
+ tfaLoginToken
+ }
+ }
}
- }
- `,
- GQL_MUTATION_LOGIN: gql`
- mutation($username: String!, $password: String!, $provider: String!) {
- login(username: $username, password: $password, provider: $provider) {
- succeeded
- message
- tfaRequired
- tfaLoginToken
+ `,
+ MUTATION_LOGINTFA: gql`
+ mutation($loginToken: String!, $securityCode: String!) {
+ authentication {
+ loginTFA(loginToken: $loginToken, securityCode: $securityCode) {
+ operation {
+ succeeded
+ code
+ slug
+ message
+ }
+ }
+ }
}
- }
- `,
- GQL_MUTATION_LOGINTFA: gql`
- mutation($loginToken: String!, $securityCode: String!) {
- loginTFA(loginToken: $loginToken, securityCode: $securityCode) {
- succeeded
- message
+ `
+ },
+ TRANSLATIONS: {
+ QUERY_NAMESPACE: gql`
+ query($locale: String!, $namespace: String!) {
+ translations(locale:$locale, namespace:$namespace) {
+ key
+ value
+ }
}
- }
- `
+ `
+ }
}
diff --git a/client/modules/localization.js b/client/modules/localization.js
index c13e2719..26e36c9c 100644
--- a/client/modules/localization.js
+++ b/client/modules/localization.js
@@ -19,7 +19,7 @@ module.exports = {
ajax: (url, opts, cb, data) => {
let langParams = url.split('/')
graphQL.query({
- query: CONSTANTS.GRAPHQL.GQL_QUERY_TRANSLATIONS,
+ query: CONSTANTS.GRAPH.TRANSLATIONS.QUERY_NAMESPACE,
variables: {
locale: langParams[0],
namespace: langParams[1]
diff --git a/client/scss/app.scss b/client/scss/app.scss
index 67f0454d..11f30520 100644
--- a/client/scss/app.scss
+++ b/client/scss/app.scss
@@ -1,5 +1,7 @@
@import "global";
+@import "base/reset";
+@import "base/base";
@import 'base/icons';
@import "../libs/animate/animate";
diff --git a/client/scss/components/setup.scss b/client/scss/components/setup.scss
index e073d87e..03e6be92 100644
--- a/client/scss/components/setup.scss
+++ b/client/scss/components/setup.scss
@@ -2,7 +2,7 @@
background-color: #1565c0;
background-image: url('../static/svg/config-bg.svg');
width: 100%;
- min-height: 100%;
+ min-height: 100vh;
padding-top: 1rem;
.welcome {
diff --git a/client/scss/global.scss b/client/scss/global.scss
index 761f4149..8f06dc4f 100644
--- a/client/scss/global.scss
+++ b/client/scss/global.scss
@@ -4,6 +4,4 @@ $primary: 'indigo';
@import "base/variables";
@import "base/material";
-@import "base/reset";
@import "base/mixins";
-@import "base/base";
diff --git a/client/static/svg/auth-icon-auth0.svg b/client/static/svg/auth-icon-auth0.svg
new file mode 100644
index 00000000..9bf44793
--- /dev/null
+++ b/client/static/svg/auth-icon-auth0.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/client/static/svg/auth-icon-discord.svg b/client/static/svg/auth-icon-discord.svg
new file mode 100644
index 00000000..281dd379
--- /dev/null
+++ b/client/static/svg/auth-icon-discord.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/client/static/svg/auth-icon-dropbox.svg b/client/static/svg/auth-icon-dropbox.svg
new file mode 100644
index 00000000..155c67c2
--- /dev/null
+++ b/client/static/svg/auth-icon-dropbox.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/client/static/svg/auth-icon-ldap.svg b/client/static/svg/auth-icon-ldap.svg
index 679fc237..2ab8ff17 100644
--- a/client/static/svg/auth-icon-ldap.svg
+++ b/client/static/svg/auth-icon-ldap.svg
@@ -1,7 +1,4 @@
-
-
-
-