-
-
Notifications
You must be signed in to change notification settings - Fork 2k
A new type of auth #2532
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
base: dev
Are you sure you want to change the base?
A new type of auth #2532
Conversation
""" | ||
|
||
# For Linux systems, we follow the XDG Base Directory Specification | ||
# Check if os is linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this code been modified? Did you force push HEAD? Rebase your edits onto the latest master/dev branch upstream.
This was implemented in #2514
redirect_uri = f"http://127.0.0.1:{cls._SERVER_PORT}/redirect" | ||
auth_url = cls._construct_auth_url(client_id, scope, redirect_uri) | ||
|
||
print("=" * 60) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't be printing anything. Please follow project code styles.
while True: | ||
server.handle_request() | ||
except cls._Authorization as auth: | ||
print("✅ Authorization successful!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get rid of this AI slop emojis.
|
||
except Exception as e: | ||
print(f"❌ Authentication failed: {e}") | ||
sys.exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sys.exit LMAO????
) | ||
|
||
# Auto-enable browser auth if no custom credentials are provided and browser_auth not explicitly set | ||
if (not hasattr(arguments, 'browser_auth') or not arguments.browser_auth) and \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gave me an aneurysm
Description
This PR introduces a new browser-based authentication flow for SpotDL, allowing users to log in to Spotify without needing to create a Spotify Developer App or provide API keys. The implementation includes:
Related Issue
This PR addresses a usability issue for non-technical users like myself who struggle or aren't a fan of API key setup.
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate)
N/A (feature is CLI/browser-based)
Types of Changes
New feature (non-breaking change which adds functionality)
My code follows the code style of this project
Main focus: This PR is solely about making authentication easier for users. No other features or refactors are included. Please see AUTH_DOCUMENTATION.md for a full explanation of the new authentication flow.