Skip to content

Commit

Permalink
images: Create /authentication_backends directory for icons.
Browse files Browse the repository at this point in the history
Creates `static/images/authentication_backends` directory for icons
of backend authentication methods, which are used on the log-in page.

And updates the example documentation in the API `/server_settings`
endpoint.
  • Loading branch information
laurynmm authored and timabbott committed Oct 31, 2022
1 parent 89713ba commit 1eda42f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions zerver/openapi/zulip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13321,14 +13321,14 @@ paths:
{
"name": "google",
"display_name": "Google",
"display_icon": "/static/images/landing-page/logos/googl_e-icon.png",
"display_icon": "/static/images/authentication_backends/googl_e-icon.png",
"login_url": "/accounts/login/social/google",
"signup_url": "/accounts/register/social/google",
},
{
"name": "github",
"display_name": "GitHub",
"display_icon": "/static/images/landing-page/logos/github-icon.png",
"display_icon": "/static/images/authentication_backends/github-icon.png",
"login_url": "/accounts/login/social/github",
"signup_url": "/accounts/register/social/github",
},
Expand Down
10 changes: 5 additions & 5 deletions zproject/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ class GitHubAuthBackend(SocialAuthMixin, GithubOAuth2):
name = "github"
auth_backend_name = "GitHub"
sort_order = 100
display_icon = "/static/images/landing-page/logos/github-icon.png"
display_icon = "/static/images/authentication_backends/github-icon.png"

def get_all_associated_email_objects(self, *args: Any, **kwargs: Any) -> List[Dict[str, Any]]:
access_token = kwargs["response"]["access_token"]
Expand Down Expand Up @@ -1946,15 +1946,15 @@ class AzureADAuthBackend(SocialAuthMixin, AzureADOAuth2):
sort_order = 50
name = "azuread-oauth2"
auth_backend_name = "AzureAD"
display_icon = "/static/images/landing-page/logos/azuread-icon.png"
display_icon = "/static/images/authentication_backends/azuread-icon.png"


@external_auth_method
class GitLabAuthBackend(SocialAuthMixin, GitLabOAuth2):
sort_order = 75
name = "gitlab"
auth_backend_name = "GitLab"
display_icon = "/static/images/landing-page/logos/gitlab-icon.png"
display_icon = "/static/images/authentication_backends/gitlab-icon.png"

# Note: GitLab as of early 2020 supports having multiple email
# addresses connected with a GitLab account, and we could access
Expand All @@ -1970,7 +1970,7 @@ class GoogleAuthBackend(SocialAuthMixin, GoogleOAuth2):
sort_order = 150
auth_backend_name = "Google"
name = "google"
display_icon = "/static/images/landing-page/logos/googl_e-icon.png"
display_icon = "/static/images/authentication_backends/googl_e-icon.png"

def get_verified_emails(self, *args: Any, **kwargs: Any) -> List[str]:
verified_emails: List[str] = []
Expand Down Expand Up @@ -2001,7 +2001,7 @@ class AppleAuthBackend(SocialAuthMixin, AppleIdAuth):
sort_order = 10
name = "apple"
auth_backend_name = "Apple"
display_icon = "/static/images/landing-page/logos/apple-icon.png"
display_icon = "/static/images/authentication_backends/apple-icon.png"

# Apple only sends `name` in its response the first time a user
# tries to sign up, so we won't have it in consecutive attempts.
Expand Down

0 comments on commit 1eda42f

Please sign in to comment.