ogallagher / tejos_textiles

An online arts journal for publishing works in a new medium
MIT License
1 stars 0 forks source link

Account activation is buggy #77

Closed ogallagher closed 4 years ago

ogallagher commented 4 years ago

When testing today I was not able to activate an account with Google Chrome; the expiry error message kept popping up. I'll have to look into this ASAP.

ogallagher commented 4 years ago

An improvement to the account activation and debugging process would be to differentiate between "session not found on server" and "activation code not found for session" errors.

Another would be to, if the current session doesn't have an associated activation code, search for other sessions with the same username. Or, an alternative would be to store activation codes in a separate structure, with associated usernames instead of sessions.

ogallagher commented 4 years ago
ogallagher commented 4 years ago
ogallagher commented 4 years ago

Update on the original error: it’s not just a problem with Chrome. For some reason the session server is not correctly adding activation codes to the appropriate session objects and then retrieving them afterward.

EDIT: It’s because in some cases a session will already be in the session cache when an activation is attempted and a code is not found. In this case, a new session file is created to replace the old one with an activation code, but the copy in the session cache will not reflect that change.

Or, an alternative would be to store activation codes in a separate structure, with associated usernames instead of sessions.

ogallagher commented 4 years ago

Activation should now be much less buggy; one doesn’t need to verify an activation code using the same session that the code was requested with, now that activation codes are associated only with usernames.