Added GitHub and Slack authentication integrations

This commit is contained in:
NGPixel
2017-02-24 16:50:04 -05:00
parent ee16b82f17
commit 9976842e45
13 changed files with 60 additions and 13 deletions

View File

@@ -50,18 +50,26 @@ html
span Log in using...
if appconfig.auth.microsoft && appconfig.auth.microsoft.enabled
button.ms(onclick='window.location.assign("/login/ms")')
i.fa.fa-windows
i.icon-windows2
span Microsoft Account
if appconfig.auth.google && appconfig.auth.google.enabled
button.google(onclick='window.location.assign("/login/google")')
i.fa.fa-google
i.icon-google
span Google ID
if appconfig.auth.facebook && appconfig.auth.facebook.enabled
button.facebook(onclick='window.location.assign("/login/facebook")')
i.fa.fa-facebook
i.icon-facebook
span Facebook
if appconfig.auth.github && appconfig.auth.github.enabled
button.github(onclick='window.location.assign("/login/github")')
i.icon-github
span GitHub
if appconfig.auth.slack && appconfig.auth.slack.enabled
button.slack(onclick='window.location.assign("/login/slack")')
i.icon-slack
span Slack
#copyright
= t('footer.poweredby') + ' '
a.icon(href='https://github.com/Requarks/wiki')
i.icon-github
a(href='https://github.com/Requarks/wiki') Requarks Wiki
a(href='https://wiki.requarks.io/') Wiki.js

View File

@@ -21,6 +21,10 @@
option(value='google') Google ID
if appconfig.auth.facebook.enabled
option(value='facebook') Facebook
if appconfig.auth.github.enabled
option(value='github') GitHub
if appconfig.auth.slack.enabled
option(value='slack') Slack
section(v-if='provider=="local"')
label.label Password:
p.control.is-fullwidth

View File

@@ -37,7 +37,9 @@ block adminContent
when 'local': i.icon-server
when 'windowslive': i.icon-windows2.is-blue
when 'google': i.icon-google.is-blue
when 'facebook': i.icon-facebook.is-purple
when 'facebook': i.icon-facebook.is-indigo
when 'github': i.icon-github.is-grey
when 'slack': i.icon-slack.is-purple
default: i.icon-warning
= t('auth:providers.' + user.provider)
label.label Member since

View File

@@ -34,8 +34,14 @@ block adminContent
i.icon-google.is-blue
| Google ID
when 'facebook'
i.icon-facebook.is-purple
i.icon-facebook.is-indigo
| Facebook
when 'github'
i.icon-github.is-blue-grey
| GitHub
when 'slack'
i.icon-slack.is-purple
| Slack
default: i.icon-warning
td.is-centered= userMoment(usr.createdAt).format('lll')
td.is-centered= userMoment(usr.updatedAt).format('lll')

View File

@@ -43,6 +43,12 @@ block adminContent
when 'facebook'
i.icon-facebook.is-purple
| Facebook
when 'github'
i.icon-github.is-blue-grey
| GitHub
when 'slack'
i.icon-slack.is-purple
| Slack
default: i.icon-warning
td.is-centered= userMoment(usr.createdAt).format('lll')
td.is-centered= userMoment(usr.updatedAt).format('lll')