smpallen99/coherence

Coherence - Rememberable and Resumable.js not working the second time

agacode opened this issue · 0 comments

When I use Coherence - Rememberable with Resumable.js only works the first time.
If I stop the Phoenix Server start it again and try the Resumable.js again, it removes the rememberable record from the DB and returns 401 for all following calls.
This is the stack trace before it fails:

[debug] QUERY OK source="rememberables" db=0.9ms queue=0.1ms
DELETE FROM "rememberables" AS r0 WHERE (r0."token_created_at" < $1) [~N[1917-06-17 14:34:55]]
[debug] QUERY OK source="rememberables" db=2.2ms
SELECT count(r0."id") FROM "rememberables" AS r0 WHERE (((r0."user_id" = $1) AND (r0."series_hash" = $2)) AND (r0."token_hash" != $3)) [3, "RvmuTEdhUOSqo4os26P_k9YVp_U=", "NRBkBO0-4Xd4tfEnD0NPRrcATGM="]
[debug] QUERY OK source="rememberables" db=1.3ms queue=0.3ms
DELETE FROM "rememberables" AS r0 WHERE (r0."user_id" = $1) [3]
[warn] Invalid token. Potential Fraud.
[info] Sent 302 in 61ms
[debug] QUERY OK source="rememberables" db=1.6ms queue=1.7ms
DELETE FROM "rememberables" AS r0 WHERE (r0."token_created_at" < $1) [~N[1917-06-17 14:34:56]]
[debug] QUERY OK source="rememberables" db=9.0ms queue=0.2ms
SELECT count(r0."id") FROM "rememberables" AS r0 WHERE (((r0."user_id" = $1) AND (r0."series_hash" = $2)) AND (r0."token_hash" != $3)) [3, "RvmuTEdhUOSqo4os26P_k9YVp_U=", "NRBkBO0-4Xd4tfEnD0NPRrcATGM="]
[debug] QUERY OK source="rememberables" db=2.1ms queue=0.1ms
SELECT r0."id", r0."series_hash", r0."token_hash", r0."token_created_at", r0."user_id", r0."inserted_at", r0."updated_at" FROM "rememberables" AS r0 WHERE (((r0."user_id" = $1) AND (r0."series_hash" = $2)) AND (r0."token_hash" = $3)) [3, "RvmuTEdhUOSqo4os26P_k9YVp_U=", "NRBkBO0-4Xd4tfEnD0NPRrcATGM="]
[debug] No valid login found
[info] Sent 401 in 81ms