Skip to content
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

1333: Add activation route #1334

Merged
merged 8 commits into from
Apr 2, 2024
Merged

1333: Add activation route #1334

merged 8 commits into from
Apr 2, 2024

Conversation

f1sh1918
Copy link
Contributor

@f1sh1918 f1sh1918 commented Mar 5, 2024

Short description

An activation page is needed to handle opening activation links without the app being installed on the smartphone.
Remind the user that the app has to be installed before the card can be activated.

Proposed changes

  • add an activation route
  • add install instructions
  • add a separate ProjectSwitcher component for dev issues (make it reusable)

Fixes: #1333

Testing

a) dev environment

  • create a card
  • move the pdf on your device
  • uninstall the app on the device (ehrenamt)
  • for testing on dev environment you have to use the following linking scheme to test the route in your browser on mobile device .
    http://<networkip>:3000/activation/code#activationCode/ (use the activation code in the console)

There is no real good way to test it on dev environment unfortunately, because we need a localhost/localNetworkIp link to open the route locally. There also might be issues that connection is lost in the flutter app meanwhile you are in the browser and follow instructions. But this can only happen on dev environments (app in background).

b) staging

  • create a card
  • uninstall the app (ehrenamt)
  • open the link in the pdf on smartphone

@f1sh1918 f1sh1918 marked this pull request as ready for review March 5, 2024 16:15
Copy link
Member

@ztefanie ztefanie left a comment

Choose a reason for hiding this comment

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

I tried to test this, but it did not work, or I did something wrong.

What I did:

  1. Created a card
  2. opened http://localhost:3000/activation/AtIEThFmwAN49h0rWeIwBcB1JoS7gTkn7zJ9UFp8pSU=
    The string in the end, is the activation code that is shown below of the qr code on the pdf.
    When the activation code does not contain a e.g. slash, i got this error message Der von Ihnen geöffnete Link ist ungültig. Der Link wurde fehlerhaft in den Browser übertragen. Versuchen Sie, den Link manuell aus der E-Mail oder dem PDF zu kopieren.
    when it does contain a slash, i was just redirected to the login page.

@f1sh1918
Copy link
Contributor Author

f1sh1918 commented Mar 6, 2024

I tried to test this, but it did not work, or I did something wrong.

What I did:

  1. Created a card
  2. opened http://localhost:3000/activation/AtIEThFmwAN49h0rWeIwBcB1JoS7gTkn7zJ9UFp8pSU=
    The string in the end, is the activation code that is shown below of the qr code on the pdf.
    When the activation code does not contain a e.g. slash, i got this error message Der von Ihnen geöffnete Link ist ungültig. Der Link wurde fehlerhaft in den Browser übertragen. Versuchen Sie, den Link manuell aus der E-Mail oder dem PDF zu kopieren.
    when it does contain a slash, i was just redirected to the login page.

Sorry I forgot to mention
This PR depends on #1324 the link Scheme has to be
activation/code#activationCode/ and the activation Code has to be Uri encoded which should be the case for console.log message . Gonna add an example link in the description.
Probably it makes sense to review #1324 first and merge it

Until i tested michis comments, i'm gonna revert the pr to draft.

@f1sh1918 f1sh1918 marked this pull request as draft March 6, 2024 09:45
@f1sh1918 f1sh1918 marked this pull request as ready for review March 11, 2024 09:02
Copy link
Member

@michael-markl michael-markl left a comment

Choose a reason for hiding this comment

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

did not test it

f1sh1918 and others added 4 commits March 11, 2024 19:57
Co-authored-by: Michael Markl <marklmichael98@gmail.com>
Co-authored-by: Michael Markl <marklmichael98@gmail.com>
Co-authored-by: Michael Markl <marklmichael98@gmail.com>
@f1sh1918
Copy link
Contributor Author

@ztefanie i would appreciate a second review since michael did not test it. thx

Copy link
Member

@ztefanie ztefanie left a comment

Choose a reason for hiding this comment

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

I tested it on Android emulator.

I get this as the first screen wenn opening http://localhost:3000/activation/code#ChQKBHRlc3QQoqMBGggKAggBIgIIABIQIuF4botoitZxNY86gioBKxoUJPaMJ8zLarOKBYaIDlfvjFLw0fU=

on the emulator:
android emulator

After clicking on bayern, i see the screen i would have expected. But i think this first screen should not be displayed.

When opening in the browser (on my linux machine) it get:
First screen:
brwoser
second screen:
brwoser-2

@f1sh1918
Copy link
Contributor Author

This screen is dev only and we need it to decide which project config should be used because we have no proper URL. So this is fine @ztefanie

@f1sh1918 f1sh1918 requested a review from ztefanie March 25, 2024 15:45
@f1sh1918 f1sh1918 merged commit 2dd6211 into main Apr 2, 2024
1 check passed
@f1sh1918 f1sh1918 deleted the 1333-add-activation-route branch April 2, 2024 10:39
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.

Add activation route
3 participants