Go to your browser cookie settings and explicitly allow cookies from auth.riotgames.com.
To do this in Chrome, go to chrome://settings/content/cookies?search=cookies and press the "Add" button on the "Allow" section. Type "[*.]auth.riotgames.com" and hit Add.
To do this in Firefox, go to about:preferences and in the upper right there's a box to "Find in Options". Type "cookies and site data" there. The search results should auto-update. A "Manage permissions" should be visible. Click that. Type "https://auth.riotgames.com" (without the double quotes) and press Allow. Make sure to press "Save changes" afterwards too.
(Make sure your browser is up to date, the UIs might change from one version to another and I've only tested this with the latest version at the time of writing.)