login for credential-based authentication and validateSession for verifying an existing session token.
Endpoint: AUTH service — https://script.google.com/macros/s/AKfycbwATstMSSnuYZMeGEjI7Q5cznO6kA8rqLo7zNZLmu_f29qwcyt4Fucn5VIBdB9tMoRg/exec
The app stores the full user object in
localStorage under the key gpsepedia_session. On each page load, checkSession() reads this and calls validateSession to confirm the session is still active before rendering the app.Each role has a concurrent session limit enforced server-side:
Tecnico = 1, Supervisor = 2, Jefe = 3, Desarrollador = unlimited. When the limit is exceeded, the oldest session is automatically revoked.Login
Action:login
Authenticates a user with a username and password. Returns the full user object including a new SessionToken on success. Usernames are matched case-insensitively.
Request
Must be
"login".The user’s username (case-insensitive match).
The user’s password (case-sensitive match).
Response
"success" on success, "error" on failure.Present only on success.
Example
Validate session
Action:validateSession
Checks whether a previously issued session token is still active in the ActiveSessions sheet. Returns { valid: false } — not an error — when the session is invalid or expired.
Request
Must be
"validateSession".The
ID of the user from the stored session object.The
SessionToken returned from a prior login response.Response
true if the session token matches an active session for the given user ID; false otherwise. Note: this response does not include a status field on the success path — only valid.