-
-
Notifications
You must be signed in to change notification settings - Fork 226
Credentials helper if config not present or unparseable #44
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
Conversation
689af21
to
de8bc56
Compare
So the config struct got extended while I worked on this. I've rebased so everything is up-to-date at least, but the login helper will wipe out the new settings... (actually maybe every execution, I need to look into it) Speaking of theming thats the other piece of feedback I'd like on this PR. The login interface's style isn't really in line with the rest of ncspot. |
Hey there and thanks a lot for your work on this!
Yes, I think we are. Especially, because this simplifies the configuration process quite a bit! Maybe it'd make sense to store the login data in a separate file? I was already thinking about creating a folder for configuration files (
Mhh, if keeping it a separate application simplifies it, I think I'm okay with it. In the end, we don't want to run the main application if we can't login and I don't believe the authentication application will need any of the views/features of the main application, right? |
... I was already thinking about creating a folder for configuration files
I had the same thought, I'll work towards introducing it in this PR
unless you get it done beforehand.
In the end, we don't want to run the main application if we can't login and I don't believe the authentication application will need any of the views/features of the main application, right?
Agreed on the former, on the latter I need to look into credential
verification. Right now if you enter an invalid username/password the
app panics in an ugly fashion so I'd really like to verify the
credentials and force the user back into the login loop if they're not
valid. If there's an easy librespot call for that, then perfect, but
its possible I'll need to factor out whatever the main app is using.
FYI I got a busy week, but this still has that dependency on my
unmerged librespot PR so no rush.
tyvm for the feedback!
…On Mon, 25 Mar 2019 at 10:06, Henrik ***@***.***> wrote:
Hey there and thanks a lot for your work on this!
Are we ok changing the config file?
Yes, I think we are. Especially, because this simplifies the configuration process quite a bit! Maybe it'd make sense to store the login data in a separate file? I was already thinking about creating a folder for configuration files (~/.config/ncspot/*) instead of a single file in ~/.config, which also seems to be more in line with XDG.
Is this way of doing logins OK, or would we rather have the login interface part of the main cursive application?
Mhh, if keeping it a separate application simplifies it, I think I'm okay with it. In the end, we don't want to run the main application if we can't login and I don't believe the authentication application will need any of the views/features of the main application, right?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@medwards: Small heads up, the config file now resides in |
Spotify auth endpoint polling is still done without futures and there is no verification of the credentials so entering a bad username/pass still results in ungraceful failure later. On an unrelated note: I'm a couple of issues and I'm not sure if they're ncspot or upstream projects (ie |
Yeah, go ahead. Do you still want to polish this in your branch or should we get this in tree? |
I'm fine with merging if you have no review comments.
…On Thu, 28 Mar 2019, 09:04 Henrik, ***@***.***> wrote:
On an unrelated note: I'm a couple of issues and I'm not sure if they're
ncspot or upstream projects (ie librespot or rodio). Can I spam the issue
tracker with them until they're nailed down?
Yeah, go ahead.
Do you still want to polish this in your branch or should we get this in
tree?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#44 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcq2Y2XqTODllSWiNdCKPE3SFteyWlks5vbHd3gaJpZM4cFy2h>
.
|
I might have some sort of obscure bug with this change. On one machine, everything works fine, on the other I get
then everything launches and I can play music but the output is some garbled garbage. I'm going to try to press gang some people to see if its just something weird on my one machine or a broader issue. I would be v happy if you verified this change locally before merging as well XD |
I tested this after your initial submission and it worked fine. No rush, though. We should probably investigate the issue you're encountering. I might be able to work on the polling and credential checking this week, too. I wanted to finish that first before merging it. |
Eh, the broken audio looks like just a library behind the scenes getting updated now or a file handles issue. All good now after a reboot. |
I have merged this with some minor wording changes ;) We can keep working on this in-tree. Thanks again! |
LOL I completely forgot it was still called tyvm for the wording changes |
Fixes #1 but requires librespot-org/librespot#313 (though I can probably make a workaround)
This PR introduces a login helper interface (authentication.rs) that is invoked if there is no config file or the config file fails to parse. It proposes a breaking change to the config file format to match librespot credentials. Note: it also writes to the config file, so back it up if this is a concern.
It requires a bit of work before I'm happy with it:
Credentials
instead of its serializationAt this point my biggest feedback request is: