Fix multi-process issue when authenticating
As uvicorn may be run with at maximum of 9 workers (because of the number of connections to the database,) it may happen that one worker starts the authentication process and another finishes it. However, the global variable `tmp_auth_store` is not shared between these workers (processes.) This is fixed with storing temporary information to files. This problem could be avoided by sticking with RESTful architecture. However, authentication is challenging as OpenStreetMap use OAuth1 which support only authorization. Therefore, for authentication purposes of the damn server, RESTful architecture is broken.
Showing with 38 additions and 20 deletions