As I said in the title, every time I refresh my webpage, the Google OAuth has me log in again. I'm new to the Google OAuth thing and I'm just using the docs for the Google Calendar API. I'm trying to make a web app that lists everything on my calendar. I've attached the code I'm using below. If anyone could help, it'd be very much appreciated!
JS Script used for logging in: https://pastebin.com/XDBmwzgc
HTML Body tag: <body onload="handleAuthClick()">
HTML Script tags: <script async defer src="https://apis.google.com/js/api.js" onload="gapiLoaded()"></script> (in HTML head),
<script src="./calendar.js"></script> (in body),
<script async defer src="https://accounts.google.com/gsi/client" onload="gisLoaded()"></script> (in body).