diff --git a/README.md b/README.md index 2f6fa463..46b613a1 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Authorization code flow: -http://sl-server:7777/oauth/authorize?client_id=client-id&state=123456&response_type=code&redirect_uri=http%3A%2F%2Fsl-client%3A7000%2Fcallback&state=dvoQ6Jtv0PV68tBUgUMM035oFiZw57 +http://sl-server:7777/oauth/authorize?client_id=client-id&state=123456&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A7000%2Fcallback&state=dvoQ6Jtv0PV68tBUgUMM035oFiZw57 Implicit flow: http://sl-server:7777/oauth/authorize?client_id=client-id&state=123456&response_type=token&redirect_uri=http%3A%2F%2Fsl-client%3A7000%2Fcallback&state=dvoQ6Jtv0PV68tBUgUMM035oFiZw57 diff --git a/app/models.py b/app/models.py index 4acbafe9..b8883efa 100644 --- a/app/models.py +++ b/app/models.py @@ -446,7 +446,12 @@ class ClientUser(db.Model, ModelMixin): res[Scope.NAME.value] = self.user.name elif scope == Scope.AVATAR_URL: if self.user.profile_picture_id: - res[Scope.AVATAR_URL.value] = self.user.profile_picture.get_url() + if self.default_avatar: + res[Scope.AVATAR_URL.value] = URL + "/static/default-avatar.png" + else: + res[ + Scope.AVATAR_URL.value + ] = self.user.profile_picture.get_url() else: res[Scope.AVATAR_URL.value] = None elif scope == Scope.EMAIL: diff --git a/app/oauth/templates/oauth/authorize.html b/app/oauth/templates/oauth/authorize.html index 9970a61d..be1806d6 100644 --- a/app/oauth/templates/oauth/authorize.html +++ b/app/oauth/templates/oauth/authorize.html @@ -4,6 +4,33 @@ Authorization {% endblock %} +{% block head %} + +{% endblock %} + {% block default_content %}