Add opt-out functionality to all secure signal sample pages#48
Add opt-out functionality to all secure signal sample pages#48eiman-eltigani-ttd merged 13 commits intomainfrom
Conversation
|
Implementation details:
|
| </div> | ||
| <div id="optout_message" style="display: none" class="form"> | ||
| <button type="button" class="button" id="try_another">Try Another Email</button> | ||
| </div> |
There was a problem hiding this comment.
Also created an optout banner because the response for opt-out and initial page load is the same.
| window.location.replace('/'); | ||
| }); | ||
| }); | ||
| </script> |
There was a problem hiding this comment.
The fetch/AJAX request was intercepting normal form submission and wasnt allowing other pages to render properly (now the error page and optout page are displaying as expected). Also secure signals are loaded/cleared automatically based on the identity state so it was simpler to remove it all
There was a problem hiding this comment.
Lastly, I applied the same logic I used on the client side after getting that working and tested properly. I still need to verify that it works locally after the Dockerfile is setup correctly/any final changes are made.
| </div> | ||
| <div><input type="submit" value="Generate UID2" class="button" /></div> | ||
| </form> | ||
| <script> |
There was a problem hiding this comment.
I think this may be breaking the non-optout flow. It's not working anymore.
There was a problem hiding this comment.
Updated env.sample file and added SESSION_KEY so users know thats needed to run server-side site
|
Was able to get React running with npm start by downloading dotenv-cli which allows you to load environment variables from a specific file path, updated the instructions in the ReadMe and env.sample file as well |
Uh oh!
There was an error while loading. Please reload this page.