bcgov / nr-forests-access-management

Authorization solution for BC natural resource sector
Apache License 2.0
8 stars 2 forks source link

Create a user access history page #1540

Closed MCatherine1994 closed 1 month ago

MCatherine1994 commented 2 months ago

Describe the task Create a new user access history page

Acceptance Criteria

Additional context

Image

ianliuwk1019 commented 1 month ago

As discussed, we might like to do the SideNav change at this ticket or separate it into another ticket: Image

craigyu commented 1 month ago

To accommodate the url requirement (/users/:userId/applications/:appId), changes have to be made to the frontend router setup. There are two ways of doing this, using createWebHistory or createWebHashHistory. The hash history is the easiest to convert to without doing any extra configuration to the front-end server. It is not SEO friendly, but for an app like FAM, it does not matter. Here is a detailed comparison between the two methods.

1. createWebHistory (History API)

Advantages:

Disadvantages:

Best For:

2. createWebHashHistory (Hash Mode)

Advantages:

Disadvantages:

Best For:

Which One is Better for Deep Links?

If SEO and Clean URLs Are Important:

If You Want Simplicity and Compatibility:

Conclusion:

For a public-facing site or where you control the server and need clean, SEO-friendly URLs, createWebHistory is the way to go. For internal apps or simpler setups where you need to avoid server configuration hassles, createWebHashHistory is a reliable, quick solution.