usdigitalresponse / arpa-reporter

Web app to aid government agencies in reporting on ARPA grants.
Apache License 2.0
3 stars 0 forks source link

GOST Integration: populate redirect_to field during login #518

Closed mattbroussard closed 2 years ago

mattbroussard commented 2 years ago

We set a new URL param, redirect_to when redirecting to the login page from another VueRouter route, and the login page forwards that to its /api/sessions call.

In standalone ARPA Reporter repo, this parameter is ignored. But in GOST once https://github.com/usdigitalresponse/usdr-gost/pull/288 is merged, it will cause the login link email that's sent to also include a redirect_to field. In this way, after logging in using the GOST /api/sessions endpoints, the user is redirected back to ARPA Reporter rather than going to the GOST/ID Tool dashboard.

The VueRouter APIs used here automatically account for the base config option that will be set in GOST to nest the ARPA Reporter app under a URL path.