Hiranya Jayathilaka
1 min readAug 16, 2019

--

Hi Maxim,

My expertise in the area of client-side webapp development is limited. From what I can fathom I’d say:

  • Use buttons for cases where you want the user to stay on the same page. Tie the backend API call to the button click event (it sounds like you’re already doing something like this).
  • For situations where the user should be sent to a different page, use a form submission followed by a server-side redirect upon success?

In any case I won’t recommend injecting ID tokens into hyperlinks. It just results in all sorts of weirdness. If the user leaves a page open for a while, the ID tokens will expire, and all the links will become invalid.

I’d also recommend you to ask around in Stackoverflow. Your question will receive more visibility, and hopefully somebody knows this area better than me can help you out. Good luck!

--

--

Hiranya Jayathilaka
Hiranya Jayathilaka

Written by Hiranya Jayathilaka

Software engineer at Shortwave. Ex-Googler. PhD in CS. Enjoys working on cloud, mobile and programming languages. Fan of all things tech and open source.

No responses yet