Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect to dash instead of profile on login #104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions portal/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
from django.contrib.auth import login
from django.contrib.auth.decorators import login_required
from django.core.exceptions import BadRequest
from django.core.mail import send_mail
from django.db import IntegrityError
from django.shortcuts import redirect, render
from django.urls import reverse
from django.utils import timezone
from requests import HTTPError
from sentry_sdk import capture_exception

from portal.forms import ChangeEmailForm, UserProfileForm
from portal.models import User
from portal.services import discord, github
from portal.views.meetings import generate_code


@login_required
Expand Down Expand Up @@ -121,7 +124,7 @@ def discord_flow_callback(request):
)
return redirect(reverse("magiclink:login") + "?next=/auth/discord")

return redirect(reverse("profile"))
return redirect(reverse("dashboard"))


def start_github_flow(request):
Expand Down Expand Up @@ -170,7 +173,7 @@ def github_flow_callback(request):
"No RCOS account found that matches your GitHub. Please sign in with email first and then link your GitHub account on your profile!",
)
return redirect(reverse("magiclink:login") + "?next=/auth/github")
return redirect(reverse("profile"))
return redirect(reverse("dashboard"))


@login_required
Expand Down