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

feat(api/portal): create OAuth2 discord redirect #217

Open
1 task done
JowiAoun opened this issue Dec 17, 2024 · 2 comments
Open
1 task done

feat(api/portal): create OAuth2 discord redirect #217

JowiAoun opened this issue Dec 17, 2024 · 2 comments
Assignees

Comments

@JowiAoun
Copy link
Collaborator

Search checkbox

  • Have you searched for similar issues?

Platforms

all

Problem Statement

The Discord bot requires redirect links from the portal to verify users and serve roles within the Discord server.

Solution

  • Create the necessary API routes on the portal to redirect users from the Discord OAuth2 app to the portal

Alternatives

...

Additional Context

...

@JeremyFriesenGitHub
Copy link
Contributor

@JowiAoun

both of these are for this, you can update if you want:

Loading
sequenceDiagram

  Actor Customer as User
  participant P1 as Discord server
  participant P2 as Discord OAuth2 Provider
  participant P3 as Discord Bot
  participant P4 as Portal 
  
  Customer ->>+ P1: Logs in
  P1 ->>+ P4: Hits linked-roles enpoint
  
  alt Successful Authentication
  
  P4 ->>+ P2: Redirects
  P2 ->>+ Customer: Asks for authorization
  Customer ->>+ P2: Authorizes
  P2 ->>+ P4: Redirects
  P4 ->>+ Customer: Notifies user
  P3 ->>+ Customer: Assigns role

  else User not logged into portal
  
  P4 ->>+ Customer : Redirects to login page
  Customer ->>+ Customer: No account

  else Services down
  
  P4 ->>+ Customer: Notify 

  else User already authenticated

  P4 ->>+ Customer: Notify 

end
Loading
sequenceDiagram
  Actor Customer as User
  participant P1 as Registration Page
  participant P2 as OAuth2 Providers

  Customer ->>+ P1: Input: Credentials
  P1 ->>+ P2: Verify

  alt Successful Authentication
    P2 ->> P2: Redirect to home page
    P2 ->> Customer: Log in successful, stand by
  else Failed Authentication
  P2 ->> P1: If rejected
  P1 ->> Customer: Notify User
  Customer ->> P2: I forgot my password...
  P2 ->> Customer: Output: Password reset
  Customer ->> Customer: I still can't remember...
end

@JowiAoun
Copy link
Collaborator Author

@JowiAoun

both of these are for this, you can update if you want:

Thanks for reminding me, this would be great to post on the docs. Since you helped making them, you could make a documentation commit and render these files. If not i'll have them up once I work on the docs for the bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants