Coder Social home page Coder Social logo

cloudflare-pages-auth's People

Contributors

charca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cloudflare-pages-auth's Issues

Question: Protect only some pages

Hi !
I was wondering if there is a way in the constants file to not choose the path we don't need to protect, but the page we DO need to protect.
I only have the pages with something like /protected/ in the URL.
Or maybe you have a way to do that in another way ?
Thanks !

Does this work with Vue PWA?

First, thank you very much for your work - this kind of password protection is really handy for most cases.

I used the vite-plugin-pwa to make my Vue App as PWA installable. That works locally really well.
But deployed on CF the web.manifest cannot be found correctly, because the new html section is injected and first shows the password prompt.

I already tried to copy the original html head into the injected one, but it does not seem to work.

Is there any way to accomplish this or do the two things (your auth and the pwa functionality) do not work together this way?

This is the PWA plugin I used: https://vite-pwa-org.netlify.app/guide/

Not working with SvelteKit and cloudflare adapter

Hello,

Thank you for your article and this code. I'm having a bit of a trouble getting it to work though. I'm using SvelteKit with the cloudflare adapter and I experience the following behaviour:

  • my first request gets correctly routed to the login page
  • if I enter wrong password, I get the error message displayed
  • if I enter correct password, I get 404 errors and no pages are found

My svelte.config.js looks like this:

import adapter from '@sveltejs/adapter-cloudflare';
import preprocess from 'svelte-preprocess';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https://github.com/sveltejs/svelte-preprocess
	// for more information about preprocessors
	preprocess: preprocess(),

	kit: {
		adapter: adapter({
			platform: 'node'
		}),

		// hydrate the <div id="svelte"> element in src/app.html
		target: '#svelte'
	}
};

export default config;

Could this issue and explanation be related somehow?

Fork and Deploy?

New to this - I simply forked the repo, created a pages instance, set the CFP_PASSWORD and thought it should work - what is the Pages configuration or is there something else that should be done?

Hugo site problem

Hi, thanks for making this. This is exactly what I was looking for, but I can't make it work. I copied functions folder into root of my site and uploaded zip to cloudflare. I added CFP_PASSWORD into pages environment variable. I tried encrypted an clear text passwords. I tried every posible combination i could think of but I simply can not get login page on my site. Can you give me any hint what else I can try.Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.