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

[Citi Vouchers] Add VINE connected app #12855

Open
rioug opened this issue Sep 11, 2024 · 5 comments · May be fixed by #12886
Open

[Citi Vouchers] Add VINE connected app #12855

rioug opened this issue Sep 11, 2024 · 5 comments · May be fixed by #12886

Comments

@rioug
Copy link
Collaborator

rioug commented Sep 11, 2024

⚠️ When working on this use the Clockify code: Citi Food Vouchers: #1A. #11922 Citi OFN Voucher - VINE Integration ⚠️

Description

See https://docs.google.com/presentation/d/1PcYNqh_2YNJ0GIaI7DDQPdKsLe5OFL5zlPl1v1ZMHmw/edit#slide=id.g279a7e25fac_0_0 for requirements

Estimation

Assumptions:

  • The api key is provided by VINE
  • A successful request to VINE api is enough to considered VINE connected app to be connected.

Tasks:

  • Create new connected app and update admin screen, including an input for API key 0.5 day
  • Create "connect" action : 1.25 day
    • Generate a JWT token to sign request to VINE
    • Try to connect to VINE with the given API key, store API key in the database on success
    • if error, provide feedback to the user, and allow to enter an new APi key

Total : 1.75 days , add 20% to cover unforeseen issue
Estimation total: 2.1 days

Acceptance Criteria & Tests

@mkllnk
Copy link
Member

mkllnk commented Sep 12, 2024

On the tasks:

  • I don't think we need a background job to connect the app.
  • We need an input field for the API key (called PAT = Personal Access Token here) which is new. The other apps don't have that.
  • The controller needs to forward params like the PAT to the specific ConnectedApp class.
  • It can then store that in the database and be connected instantly, assuming that the PAT will work.
  • We could try the PAT first and tell the user if it's wrong. That's a nice-to-have though. I wouldn't do that in the background though because instant feedback to the user is more useful here.

@rioug
Copy link
Collaborator Author

rioug commented Sep 16, 2024

  • It can then store that in the database and be connected instantly, assuming that the PAT will work.

  • We could try the PAT first and tell the user if it's wrong. That's a nice-to-have though. I wouldn't do that in the background though because instant feedback to the user is more useful here.

I am bit sceptical on not checking the PAT when turning on the connected app. It would make tracking down a wrong PAT harder, as we will probably realised the PAT is wrong when a customer tries to redeem a voucher for the first time, plus it would lead to a bad UX.

It should be pretty quick to check the PAT directly against the API and provide the ability to re enter the PAT if doesn't work. Agreed on not doing that in the background.

@maikel What do you think ?

@mkllnk
Copy link
Member

mkllnk commented Sep 17, 2024

Yes, I'm happy for that, too. Definitely better UX.

@kirstenalarsen
Copy link
Contributor

just commenting that I belatedly saw @RachL suggestion about possibly doing this on the voucher page and I quite liked. Perhaps one for delivery circle tonight

@rioug
Copy link
Collaborator Author

rioug commented Sep 18, 2024

Updated the estimate with more details on this is going to work, based on Maikel's feedback

@rioug rioug changed the title [Citi OFN Vouchers] Add VINE connected app [Citi Vouchers] Add VINE connected app Sep 18, 2024
@rioug rioug linked a pull request Oct 2, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Status: In Progress ⚙
Development

Successfully merging a pull request may close this issue.

4 participants