We're updating the issue view to help you get more done. 

wazo-auth: event sent before external auth committed to database

Description

Given I have a user without an external auth
When the user logs in to the external auth
Then the event is sent before the query was committed to the database

If an app is listening for the events and does a GET on the external auth when it received the event, a 404 is returned. A bit after, the request returns the right result.

Failing request:

Succeeding request:

Environment

None

Activity

Show:
François Blackburn
September 3, 2020, 12:15 PM
Edited

Does it happen in the same HTTP request? (sending event + reading this event)

Or it has a lot a treatment between sending the event and commit database?

Note: in wazo-confd we send event after committing in the DB

Alexandre Fournier
September 3, 2020, 12:22 PM
Edited

It’s not the same HTTP request. The external auth is created on a POST and it’s the POST that emits the event. When an app receives the event and does a GET on the external auth, if it’s too fast it gets a 404

Assignee

Unassigned

Reporter

Alexandre Fournier

Labels

Approvers

None

Pair

None

Sprint

None

Fix versions

None

Priority

Medium
Configure