Esri / storymap-journal

The Story Map Journal is ideal when you want to combine narrative text with maps and other embedded content.
Apache License 2.0
101 stars 79 forks source link

returnUrl is ignored in redirectToSignIn #70

Open regan-sarwas opened 8 years ago

regan-sarwas commented 8 years ago

This code seems to do the right thing, but after signing in, I go to my default home page on AGOL instead of returning to my app. Try https://regan-sarwas.github.io/storymaps/mapjournal/index.html?fromScratch. This was built from master on 2016-10-31

oevans commented 8 years ago

@regan-sarwas -- This is because there is no OAuth id specified in the index.html file. If you register the app and add the OAuthID to the index.html file you'll be redirected to the builder after logging in. Let me know if that works for you.

regan-sarwas commented 8 years ago

Hmm.. If that case, I think you have a bug. You should not be calling redirectToSignIn() unless the code provides an OauthID. The code in core.js certainly does not imply that Oauth is required for redirectToSignIn. To me it appears just the opposite.

BTW, Signing In for direct creation works just fine if you delete the code that calls redirectToSignIn().

Nevertheless, I will try to test with Oauth.

oevans commented 8 years ago

OK, thx for reporting this Regan. We'll look into this one as well.