Skip to content

Conversation

@thehabes
Copy link
Member

For the review process. More to come.

Devayani1612 and others added 20 commits September 9, 2025 11:56
…ng my code to dev_devayani instead of a pull request.
Made changes in my branch "dev_luis" to satisfy #3
… which had the download and copy buttons. The download and copy buttons are added in "Get a New Refresh Token" and "Access Token".
Deleted the Tokens Section and Implemented the Copy function.
Merge updates from dev_devayani branch into main
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a comprehensive redesign of the RERUM API authentication interface, transforming it from a single-page workflow to a more structured, user-friendly experience with improved organization and enhanced functionality.

  • Restructured the UI layout with responsive columns and a collapsible "Checks" section for managing authentication tokens
  • Enhanced user experience with better error handling, confirmation dialogs, and automatic token management
  • Added new features including token download/copy functionality and improved status tracking

Comment on lines +42 to +49
.column {
float: left;
width: 33%;
}

.column2 {
float: right;
width: 9%;
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using float for layout is outdated and can cause layout issues. Consider using CSS flexbox or grid instead for more reliable and modern layout management.

Suggested change
.column {
float: left;
width: 33%;
}
.column2 {
float: right;
width: 9%;
.columns-container {
display: flex;
flex-direction: row;
width: 100%;
}
.column {
flex: 0 0 33%;
/* width: 33%; */
}
.column2 {
flex: 0 0 9%;
/* width: 9%; */

Copilot uses AI. Check for mistakes.
If the token you have is not working, it may be because access tokens expire every 30 days. You can use
your refresh token to get a new access token.
</p>
<textarea class="form-control" id="a_t" placeholder="Your access token goes here."></textarea>
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same element ID 'a_t' is used in multiple places (lines 233 and 278). This creates duplicate IDs which violates HTML standards and can cause JavaScript functionality issues.

Suggested change
<textarea class="form-control" id="a_t" placeholder="Your access token goes here."></textarea>
<textarea class="form-control" id="a_t_test" placeholder="Your access token goes here."></textarea>

Copilot uses AI. Check for mistakes.
Comment on lines +365 to +368
if (window.history.replaceState) {
const cleanUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
window.history.replaceState({}, document.title, cleanUrl);
}
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The window.history.replaceState check is unnecessary in modern browsers. All browsers that support the History API also support replaceState. Consider removing the conditional check.

Suggested change
if (window.history.replaceState) {
const cleanUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
window.history.replaceState({}, document.title, cleanUrl);
}
const cleanUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
window.history.replaceState({}, document.title, cleanUrl);

Copilot uses AI. Check for mistakes.
Comment on lines +496 to +503
const copyText = $("#a_t").val()
try {
await navigator.clipboard.writeText(copyText);
alert("Copied the text: " + copyText);
} catch (err) {
console.error('Failed to copy: ', err);
alert('Failed to copy text.');
}
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Displaying the full access token in the alert message (line 499) could expose sensitive credentials if the screen is being recorded or viewed by others. Consider showing a generic success message instead.

Copilot uses AI. Check for mistakes.
Comment on lines +507 to +514
const copyText = $("#new_refresh_token").val()
try {
await navigator.clipboard.writeText(copyText);
alert("Copied the text: " + copyText);
} catch (err) {
console.error('Failed to copy: ', err);
alert('Failed to copy text.');
}
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Displaying the full refresh token in the alert message (line 510) could expose sensitive credentials if the screen is being recorded or viewed by others. Consider showing a generic success message instead.

Copilot uses AI. Check for mistakes.
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

Successfully merging this pull request may close these issues.

5 participants