DoSomethingArchive / LetsDoThis-iOS

:iphone: iOS source code for DoSomething: Take Action on the News
http://app.dosomething.org
MIT License
2 stars 0 forks source link

View campaign on web functionality #1035

Closed aaronschachter closed 8 years ago

aaronschachter commented 8 years ago

Campaigns may optionally include actions beyond standard Signup + Reportback that can currently only be completed on web (after intiial Signup).

If a Campaign contains a new property, something like view_on_web copy, and the user is viewing a campaign they have signed up for, display the copy (which would inform user why they should click through to view on web) as well as a clickable link to open the Campaign page in a web browser. The link provided will contain unique parameters to keep our authenticated user logged in when viewing the Campaign on web.

General approach per @mshmsh5000 in Slack today:

  1. Mobile app asks for the magic URL from Northstar
  2. Northstar passes this request to Phoenix
  3. Phoenix generates the token(s) and returns them via Northstar
  4. User clicks on link in mobile app
  5. User is forwarded along a set of URLs that log in without having to enter credentials, and lands on campaign page
aaronschachter commented 8 years ago

Refs https://github.com/DoSomething/phoenix/issues/6641

mikefantini commented 8 years ago

@aaronschachter with DoSomething/phoenix#6641 closed out are you still blocked on this?

@angaither @aaronschachter is there anything else that needs to to be done on this to allow the organ donation campaign to be on the mobile app?

We'll know more on Tuesday if the campaign is still on or not in its current iteration, but just wanted to make sure everything would be set to get it on the mobile app if we do stick with the Aug 1st launch date.

aaronschachter commented 8 years ago

@mikefantini -- Commented in https://github.com/DoSomething/phoenix/issues/6641#issuecomment-231409791 -- not seeing signs of Magic link in prod currently.

App development is still blocked without having design for when we should display the magic link, and the relevant copy -- @lkpttn

aaronschachter commented 8 years ago

@angaither @DFurnes Just double checking the backend work here. If a magic link copy property exists on a campaign with ID 123:

  1. App needs to POST to the Northstar v1/auth/phoenix endpoint
  2. Upon a response, app should render a button to open browser with the returned url property, appending destination=node/123 to the query string, e.g.
https://www.dosomething.org/user/magic/12345/1465404849/jPA1_ohenxutorZQ6b8OoAi4VsbJapRs-M2FJwJrhPY?destination=node/123
DFurnes commented 8 years ago

@aaronschachter Yep, that's the idea. It's ?redirect= for the query-string on the magic link though.

ngjo commented 8 years ago

Hey @lkpttn wanted to check in on this one for Voter Registration campaign. It has a Sept 1st launch, but we're aiming to test before that date though. Wanted to make sure there's nothing you need from me on this.

Let me know!

aaronschachter commented 8 years ago

@lkpttn This issue is blocked by design, and we'll need to know which campaign to test the magic_link_copy property in staging, thor, and production.

cc @NearChaos

aaronschachter commented 8 years ago

From @lkpttn via Slack:

screen shot 2016-08-10 at 4 20 22 pm
aaronschachter commented 8 years ago

Oops, forgot this is blocked still because we need test campaigns for production. We can use any published campaign and set its magic_link_copy so we can test our iOS and Fabric builds.

cc @lkpttn @ngjo Can you please comment with the campaign(s) we can test on prod with?

aaronschachter commented 8 years ago

I've added generic copy to Bumble Bands (id 2070) for easy testing (first campaign in Animals). We'll want to remove before we publish the new releases.