forked from MIT-LCP/physionet-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add login using ORCID oauth (MIT-LCP#2276)
Change introduces three new endpoints: - `authorcid_login` -> which exchanges token with ORCID using Oauth and logs in the user if ORCID is already connected to the existing user or redirects to `orcid_register` for new users - `orcid_register` -> present a form to register new users and links ORCID to it once registered - `orcid_init_login` -> builds URL and redirects to ORCID for authorization This PR also introduces changes in the login view and SSO login view: <img width="454" alt="image" src="https://github.com/user-attachments/assets/37d29dea-4744-4137-bd0b-b50f8ae7f056">
- Loading branch information
Showing
16 changed files
with
376 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% extends "base.html" %} | ||
|
||
{% load static %} | ||
|
||
{% block title %} | ||
Register | ||
{% endblock %} | ||
|
||
|
||
{% block local_css %} | ||
<link rel="stylesheet" type="text/css" href="{% static 'custom/css/login-register.css' %}"/> | ||
{% endblock %} | ||
|
||
|
||
{% block content %} | ||
<div class="container"> | ||
<form action="{% url 'orcid_register' %}" method="post" class="form-signin"> | ||
<h2 class="form-signin-heading">Create Account</h2> | ||
{% csrf_token %} | ||
{% include "form_snippet.html" %} | ||
<button class="btn btn-lg btn-primary btn-block" type="submit">Register</button> | ||
</form> | ||
<div class="form-signin"> | ||
<p>Already have an account? <a href="{% url 'login' %}">Log In</a></p> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.