question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consolidate login UI and code

See original GitHub issue

This is somewhat related to issue #333 , but should probably be done before anyone starts working on #333, only to make things easier for them.

Description

We currently support 2 ways of logging in:

  • By scanning a QR code displayed by another device (CPS = false)
  • By clicking on a sqrl link on the Anrdoid device itself (CPS = true)

We have separate UI and logic code for both of those login methods, despite the fact that they are largely identical.

Suggested enhancement Abandon the login popup window in SimplifiedActivity and use the UrlLoginActivity instead also for scanning a QR code. This could be done easily by just starting an intent to launch UrlLoginActivity after having received the sqrl:// link from the QR code scan:

    Intent urlIntent = new Intent(Intent.ACTION_VIEW);
    urlIntent.setData(Uri.parse(serverData));
    urlIntent.putExtra("EXTRA_USE_CPS", false);
    startActivity(urlIntent);

The extra which is put in the intent can be detected in UrlLoginActivity and CPS could be turned off accodingly.

This would get rid of a lot of redundancy and leave us with only one login codebase to deal with.

What do you guys think?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
sengsationalcommented, Jun 9, 2019

I hope you enjoy your holidays Alex! I’m going to be away quite a bit of time myself, coming up 17 June through 2 July. I’ll be home some of that time, but mostly away. And Daniel, I didn’t mention it in the other thread, but congratulations on the new nurse! That’s a laudable profession. My mom and nephew are nurses.

1reaction
kalaspuffarcommented, Jul 3, 2019

Hi @alexhauser

You might be mostly right about that they do the same work except for the CPS part. I think it was the IdentitySelector now that I think of it. But it has been updated and consolidated to a reasonable complexability.

As I said I think the thought of merging these are good so let’s try it. Just keep in mind that we don’t want the code to become more complex. The duplication is not extreme but can we simplify it by merging them then I’m all for it.

Best regards Daniel

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why SwiftUI and Combine will help you to build better apps
To help us reason about SwiftUI and Combine, we're going to use a simple sign-up screen which lets users enter a username and...
Read more >
Consolidate User accounts - EduBrite University
This (optional) tool allows you to consolidate (or merge) multiple users' accounts into one by linking their previous user records with the new...
Read more >
SecureAccess Washington for employers - ESD.wa.gov
SecureAccess Washington (SAW) is a central login that lets you access the online ... is a service provided by Washington's Consolidated Technology Services....
Read more >
Jet Admin: No-Code Internal Tool Builder
Build custom business apps such as internal tools or client portals incredibly fast and without code. Use drag-and-drop UI components to assemble complex ......
Read more >
Same login for Multiple apps using CookieAuthentication
Thus if one is logged into one app they are authorized on the others. I would like to consolidate my login logic to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found