diff --git a/api/views.py b/api/views.py
index 5321d517..5bed2b98 100644
--- a/api/views.py
+++ b/api/views.py
@@ -140,10 +140,16 @@ class UserGenerator(APIView):
# Create new credentials if nickname is new
if len(User.objects.filter(username=nickname)) == 0:
User.objects.create_user(username=nickname, password=token, is_staff=False)
-
else:
+ ## TODO only report a match was found if it has
+ ## been at least 30 minutes since user creation
+ ## Why: frontend gets confused to say Welcome back too soon
context['found'] = 'A matching nickname was found'
+ # TODO, "A matching nickname was found, but it is not yours!"
+ # why? It is unlikely but there is only 20 billion names
+ # but if the token is not exact
+
# TODO Keep user authenticated.
# BaseBackend.authenticate(self, request=None,username=nickname, password=token)
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 56fec1f1..4e559c3d 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -2303,6 +2303,14 @@
"semver": "^6.0.0"
}
},
+ "material-ui-image": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/material-ui-image/-/material-ui-image-3.3.2.tgz",
+ "integrity": "sha512-WE5QE0Rjdx9jPKuI0LWI7s8VQ9cifPIXObu8AUCRcidXGV3NqPI9C8c9A/C0MofKpkZ3buG8+IT9N7GgSmxXeg==",
+ "requires": {
+ "prop-types": "^15.5.8"
+ }
+ },
"merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index fc5e2a34..280eda3e 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -24,6 +24,7 @@
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
+ "material-ui-image": "^3.3.2",
"react-router-dom": "^5.2.0"
}
}
diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js
index f03c5e97..6ac372c9 100644
--- a/frontend/src/components/App.js
+++ b/frontend/src/components/App.js
@@ -10,7 +10,7 @@ export default class App extends Component {
render() {
return (
-