summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-05-10 14:03:50 +0300
committerFrederick Muriuki Muriithi2023-05-10 14:05:14 +0300
commit5bf57eafcd8c237ca2a2e747f17f18d66529557d (patch)
treee60ad2a0fc29230ef60400587bc3b720013734d7
parentb22043176eabbbc252ef8ac6875941747a7cf9a8 (diff)
downloadgn-gemtext-5bf57eafcd8c237ca2a2e747f17f18d66529557d.tar.gz
issue: Update migration steps for user collections
With the knowledge of the format of user accounts in redis, provide a new set of steps for migrating user collections.
-rw-r--r--issues/authentication_authorisation/migrate-user-collections.gmi20
1 files changed, 14 insertions, 6 deletions
diff --git a/issues/authentication_authorisation/migrate-user-collections.gmi b/issues/authentication_authorisation/migrate-user-collections.gmi
index 62a68d3..f0b3609 100644
--- a/issues/authentication_authorisation/migrate-user-collections.gmi
+++ b/issues/authentication_authorisation/migrate-user-collections.gmi
@@ -22,12 +22,20 @@ The auth(entic|oris)ation system provides the following endpoint(s) for getting
* `/oauth2/user/`: Note the trailing forward slash (/). This endpoint provides user data such as the user's ID, email and name, and their group membership information.
-There is no quick way to bridge the two systems. The most plausible is:
-
-* get the user-details from the GN3 endpoint
-* extract the email from the user-details
-* use email to fetch the old user-id from redis
-* use old user-id to fetch collections
+Since we know the form that the user account are stored in redis[1], we can use that to search for user collections.
+
+The steps would be something like:
+
+* User registers afresh using their email and (possibly new) password
+* User logs in
+* System searches for user with the same email in redis
+* If user with similar email is not found, do nothing
+* If user with similar email is found, retrieve their old user-id
+* Use old user-id to identify their collections
+* If no collections are found using the old user-id, do nothing.
+* If at least one collection is found using the old user-id present user with option to "migrate data"
+* User click the "migrate data" button
+* System changes user-id on the identified collections from the old user-id to the new user-id
## Links