GSA / notifications-admin

The UI of Notify.gov
https://notify.gov
Other
11 stars 2 forks source link

Change login.gov URL processing to using a format string. #2096

Open xlorepdarkhelm opened 1 week ago

xlorepdarkhelm commented 1 week ago

Currently, the way we are processing the URL string for login.gov is we are doing a simple string search & replace for NONCE and STATE to the values they are supposed to be. This is simple enough, but can have some hidden gotchas, as we discovered in https://github.com/GSA/notifications-admin/pull/2093 as such, I recommend we set the environment variable(s) we are using to be Python format strings, with curly braces, and then use the str.format() method on them to stick the values in. This would be cleaner, more Pythonic, and more precise, and would avoid the problem we encountered with the staging environment's env var.

This would mean the following has to be done: