New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth tutorial #2117
Comments
Please use issue template. |
@newsbielt703 Thanks for prompt response. |
You can see how I did it for my website EmailJS. In short, vuepress is good for a home site. If you need authorization somewhere, then it is better to do it where it is needed. In other words, why do you need authorization on your home site? |
In my company, I want to maintain our internal docs by Vuepress. Thus, unauthenticated access to For example, if we use RBAC on routes level, However, even though it requires auth, docs are 100% static. How do you think about this conclusion? |
For my company, I did a similar thing through IP restrictions. All go through VPN... |
@xr0master But thanks for the sharing! |
By the way, it seems webpack output does not fit with route-based authorization. Every compiled js files are in a single directory, Would it be possible to organize like this?
We might enable a new config option for grouping-components-in-the-same-chunk ( |
Another way of doing things would be to simply remove
|
Been experimenting with static docs like VuePress. So far, best way I have found is to separate "private" docs from public docs, and then adding a htpassword to protect them. Not the best method, but definitely the easiest. Alternative is investing in paid platforms that have logins and setting private/public pages, but then you are often locked into their ecosystem. I have seen the same tutorial for Okta - but would be good to have some information that covers building permissions into VuePress at some point - as I believe it definitely is a requirement for a some companies and projects. |
I've been experimenting with publishing to Azure Static Web App and using its built in authentication to manage route based authentication. An example is available at https://github.com/amoschou/vuepress-azure-swa This demonstrates a solution that uses Azure's authentication, you might find it meets your needs or can adapt it. |
@kissu
Any pure client-side code cannot handle authorization. IMHO, packages like |
I have the same issue, I can use programs like broken links checks to crawl all the pages and content before the router.beforeEach. |
Feature request
What problem does this feature solve?
In some cases, people would want to use Vuepress for private websites (e.g. private docs for company, half-public-private blog with partially private routing).
Currently, Vuepress does not say anything about Authentication (In contrast to deployment, for example).
On the Internet, I found some people implemented auth behavior directly and solely on Vuepress, without anything else.
For example, I found an article Add Authentication and Personalization to VuePress. This describes how to add auth with Okta.
I saw some other folks use navigation guard on
.vuepress/enhanceApp.js
(or theme's enhanceApp.js).There's even a plugin like InCuca/vuepress-pass.
However, Vuepress is purely static client-side website, which cannot handle authorization by itself.
So those articles all misunderstood security, or just describe client-side approach which has to combined with server-side setting.
So, in my opinion, it'd be good for official docs to have auth guide.
What does the proposal look like?
Adding some authentication tutorials. Though Vuepress is not responsible for it, it'll be helpful to some people.
For example,
Are you willing to work on this yourself?
Not sure right now. But I definitly would contribute if possible.
The text was updated successfully, but these errors were encountered: