uport-project / specs

uPort Protocol Specs
Apache License 2.0
86 stars 24 forks source link

add redirect-url param #11

Closed zachferland closed 6 years ago

zachferland commented 6 years ago

Adding this param increases optionality for developers when choosing how they want to handle responses. It also allows the uport client to make less assumptions about the callee.

The libraries and uport client will still make default assumptions for default use cases but this allows developers to receive responses how they want and may encourage us to change our defaults if used in ways we did not expected.

Minimizing assumptions implicit in some of our params allows us to unbundle functionality/dependencies in our libs. Improving front/backend flow and allowing developers to eventually plug in their own modules.

This is proposed as the most immediate simple solution although there appears to be better overall solutions if we are willing to make other spec changes at the same time. Alternatives to this include:

Notes:

zachferland commented 6 years ago

Moving this out WIP, since it looks like we decided on this option for now versus alternatives listed in the first comments. The other files have now been updated as well (cc @pelle). Should be all set to merge.

bdresser commented 6 years ago

@pelle @zachferland what's our process here? leave open until the work in mobile is complete? or merge now?

@pelle are your changes addressed & good to go?

zachferland commented 6 years ago

two additional comments/questions; 1: could just have redirect_url be defined as callback_url param added to "access_token" (token/signed request), tradeoff is param of same name (rather than new param), but less clarity. 2: seeing authorized callbacks added to specs as well, if these are being adding at the same time, implementation changes here slightly, but I think spec remains the same (cc @pelle )

edit: on second thought it makes sense to have both redirect_url and callback_url, as with authorized callbacks, the callback could be moved out of the signed payload and passed as callback_url, while you could still pass a redirect_url as well