docs
docs copied to clipboard
Manage user sessions documentation page unclear
Describe the content issue: Can you please expand this documentation to list at least the following things:
- When is the backend actually called both for getCurrentUser and fetchAuthSession or does the information just come from locally stored tokens?
- What do both the getCurrentUser and fetchAuthSession functions do in the following cases:
- User credentials are present but have expired
- User credentials are not present
What also would help greatly is a link to a general reference somewhere which seems to be completely absent from these docs. It is a massive pain to implement this at the moment and involves lots of trial and error and looking at the browser console. I feel that including this bare minimum information would already help a lot.
Also, where is the general reference to all methods? I understand that many pre-cooked fronend components and UIs are added in the new amplify library but this cannot be a replacement for actually documenting the amplify frontend library somewhere IMO. If it's there it is extremely hard to find.
URL page where content issue is: https://docs.amplify.aws/vue/build-a-backend/auth/connect-your-frontend/manage-user-sessions/
Hi @ImreC thanks for your suggestion. Regarding the information about the underlying service call, would you prefer to see it on the documentation site, or in the API TsDoc where you can see in the IDE?
Also regarding your question:
Also, where is the general reference to all methods?
The library public APIs are listed under the "API references" under each category in the left side navigation bar of the documentation site, for example, you can view the APIs of the auth category here: https://docs.amplify.aws/react/build-a-backend/auth/reference/.
@HuiSF thanks a lot for your response! I think I'd like to see the information both in the reference and in TsDoc. The crucial bit of information is under what conditions the backend is called? For example if I call fetchUserAttributes, do the attributes come from the token directly or from an http call to Cognito? I would like to know these things because it influences decisions on what to store in state management, localstorage etc.
The reference is great. I wasn't able to find this earlier. Perhaps my bad.