Enable auto-login for PTD products
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 7
- Forks
- 2
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 3
Description
In our Posit Team Snowflake Native Application which runs all the products we recently switched to OIDC. This switch however made all products require a login page like
We implemented a "fix" for this on the landing page and inside workbench in https://github.com/rstudio/partnership-snowflake/pull/1492/commits/547665679d7a048cd304e42f5a326b38fd32cdd8.
Basically for connect and package-manager use /__login__?url=/ in the landing page which will force login and redirect to the home page.
For workbench we inject html into the login page to automatically click buttons for them.
auth-login-page-html=/etc/rstudio/rstudio-login.html
<script>
// 1. ensure checkbox is checked to remember login
// 2. submit the OIDC login form with 100ms delay
window.addEventListener('DOMContentLoaded', function() {
const checkbox = document.getElementById('staySignedIn');
if (checkbox) {
checkbox.checked = true;
}
const form = document.forms['login_form'];
if (form) {
setTimeout(function() {
form.submit();
}, 100); // 100ms delay
}
});
</script>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the landing page and workbench entry points, along with the referenced partnership-snowflake commit. Check how /__login__?url=/, auth-login-page-html, and /etc/rstudio/rstudio-login.html are used; done means PTD products automatically authenticate and redirect without requiring manual login-page interaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100