-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: Expose the login code as extra parameter in the QRCode model #387
Conversation
The output of skip2/go-qrcode ToSmallString() includes an extra trailing empty line that we don't want to show, so drop it
It's nicer to have it aligned to the qrcode itself
We need to expose the code separately as different field so that the UI can show it properly both in GDM and in PAM client. The field is required
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #387 +/- ##
==========================================
+ Coverage 84.86% 84.92% +0.06%
==========================================
Files 76 76
Lines 6091 6129 +38
Branches 85 85
==========================================
+ Hits 5169 5205 +36
- Misses 646 648 +2
Partials 276 276 ☔ View full report in Codecov by Sentry. |
It adds more that an optional QR code. The impact on the project is deeper than initially discussed. Lets park this for now. |
First commits just add the code support, so I can just drop the last one and move it to another PR to keep it simpler. I added it all here since it looked related enough. |
This allows to keep supporting gdm, until it doesn't get updated since it has not support for the qrcode code yet
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.
Looks good to me. Well done!
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.
I’m not a big fan we expose that before the v2 API reshape, but I think we had enough discussions on this. So let’s move foward. The current diff is small enough despite the addition to the TUI. Approving. Thanks!
After the change introduced in authd by ubuntu/authd#387, we can now provide the device code as a separate field in the layout to improve the way it's rendered by PAM.
After the change introduced in authd by ubuntu/authd#387, we can now provide the device code as a separate field in the layout to improve the way it's rendered by PAM.
This contains a couple of adjustments to our AuthenticationModes-related functions: GetAuthenticationModes and SelectAuthenticationMode (very minor). Details are explained in more detail in the commit messages, but the TLDR is: 1- Simplify a bit of the logic in the functions; 2- Add support for the new `code` layout field introduced in [authd#387](ubuntu/authd#387); 3- Use a more comprehensive name for the authentication mode related to the device authentication; 4- Only show device authentication as a valid authentication mode if the provider is reachable and supports this mode; UDENG-3121
Expose the qrcode code as a required argument, while make possible for UI not to support qrcode rendering, but still being able to login via login code.
UDENG-3013