diff options
author | Christoph (Sheogorath) Kern | 2018-06-04 15:54:47 +0200 |
---|---|---|
committer | GitHub | 2018-06-04 15:54:47 +0200 |
commit | 551840ad57125fa168247c21613f9d6de6cd5d99 (patch) | |
tree | 51dda6767b42acc445fb169ea8ea6b4fe19050ac /public/views | |
parent | 3f7a33df646c4db3de449bd486a7dfddc9ba6e6b (diff) | |
parent | 34df7ccce83bebec1db3b6995eb25cb6fe4fdbd4 (diff) |
Merge pull request #784 from pferreir/add-oauth2-support
Add "generic" OAuth2 support
Diffstat (limited to 'public/views')
-rw-r--r-- | public/views/index/body.ejs | 4 | ||||
-rw-r--r-- | public/views/shared/signin-modal.ejs | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/public/views/index/body.ejs b/public/views/index/body.ejs index d8766fec..bf7988b7 100644 --- a/public/views/index/body.ejs +++ b/public/views/index/body.ejs @@ -15,7 +15,7 @@ <% if(allowAnonymous) { %> <a type="button" href="<%- url %>/new" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> <%= __('New guest note') %></a> <% } %> - <% if(facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || saml || email) { %> + <% if(facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || saml || oauth2 || email) { %> <button class="btn btn-sm btn-success ui-signin" data-toggle="modal" data-target=".signin-modal"><%= __('Sign In') %></button> <% } %> </div> @@ -49,7 +49,7 @@ <% if (errorMessage && errorMessage.length > 0) { %> <div class="alert alert-danger" style="max-width: 400px; margin: 0 auto;"><%= errorMessage %></div> <% } %> - <% if(facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || saml || email) { %> + <% if(facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || saml || oauth2 || email) { %> <span class="ui-signin"> <br> <a type="button" class="btn btn-lg btn-success ui-signin" data-toggle="modal" data-target=".signin-modal" style="min-width: 200px;"><%= __('Sign In') %></a> diff --git a/public/views/shared/signin-modal.ejs b/public/views/shared/signin-modal.ejs index 82b5cf1f..f0cffad9 100644 --- a/public/views/shared/signin-modal.ejs +++ b/public/views/shared/signin-modal.ejs @@ -48,7 +48,12 @@ <i class="fa fa-users"></i> <%= __('Sign in via %s', 'SAML') %> </a> <% } %> - <% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || saml) && ldap) { %> + <% if(oauth2) { %> + <a href="<%- url %>/auth/oauth2" class="btn btn-lg btn-block btn-social btn-soundcloud"> + <i class="fa fa-mail-forward"></i> <%= __('Sign in via %s', oauth2ProviderName || 'OAuth2') %> + </a> + <% } %> + <% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || saml || oauth2) && ldap) { %> <hr> <% }%> <% if(ldap) { %> @@ -73,7 +78,7 @@ </div> </form> <% } %> - <% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap) && email) { %> + <% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || oauth2) && email) { %> <hr> <% }%> <% if(email) { %> |