Skip to content

Commit

Permalink
edit procfile to remove wsgi
Browse files Browse the repository at this point in the history
  • Loading branch information
sachalevy committed May 6, 2022
1 parent a30f59d commit 836d4c8
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions feedapp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,25 @@ def callback(request):
)
if request.session.get("user") and not isinstance(request.user, AnonymousUser):
return redirect(request.build_absolute_uri(reverse("index")))
elif not request.session.get("user") and not isinstance(
request.user, AnonymousUser
):
# retrieve authentication token from Auth0, loading the user info
token = oauth.auth0.authorize_access_token(request)
request.session["user"] = token
return redirect(request.build_absolute_uri("/login/auth0"))
else:
print(
"CREDENTIALS",
settings.SOCIAL_AUTH_AUTH0_KEY,
settings.SOCIAL_AUTH_AUTH0_SECRET,
settings.SOCIAL_AUTH_AUTH0_DOMAIN,
)
return redirect(request.build_absolute_uri(reverse("index")))
# elif not request.session.get("user") and not isinstance(
# request.user, AnonymousUser
# ):
# # retrieve authentication token from Auth0, loading the user info
# token = oauth.auth0.authorize_access_token(request)
# request.session["user"] = token
# return redirect(request.build_absolute_uri("/login/auth0"))
# else:
# print(
# "CREDENTIALS",
# settings.SOCIAL_AUTH_AUTH0_KEY,
# settings.SOCIAL_AUTH_AUTH0_SECRET,
# settings.SOCIAL_AUTH_AUTH0_DOMAIN,
# )
# return redirect(request.build_absolute_uri(reverse("index")))

token = oauth.auth0.authorize_access_token(request)
request.session["user"] = token
return redirect(request.build_absolute_uri("/login/auth0"))


def login(request):
Expand Down

0 comments on commit 836d4c8

Please sign in to comment.