sso_auth: fix action tag parsing by Jusshersmith · Pull Request #227 · buzzfeed/sso
Problem
Now that we include a Provider Slug in URL paths, the logic to parse and extract the ‘action’ from the URL incorrectly returns unknown for all (most) URL’s.
Solution
Expecting a URL path of /providerSlug/redeem for example, split the path out based on / and test with the last slice item. This manually adds back the / (as the split removes it) in order to maintain a notion of URL paths within the overall logic.
Notes
Our tests didn’t catch this - would be good to come up with a test that would have caught this.