Get Parameter from URL

const urlParams = new URLSearchParams(location.search);
urlParams.get(‘token’);

You can just dump the whole url into the URLSearchParams constructor.

boom.

1 Like