Code Monkey home page Code Monkey logo

chix's Introduction

header

๐Ÿ‘‹, I'm @lrstanley, and this is my GitHub profile, where I frequently publish my open-source projects. I hope some of them can be beneficial to you or others. If you like any projects, please give some of them a โญ, it would be much appreciated!

  • ๐ŸŒŽ Originally from Michigan, US, I am currently located in North Carolina, US.
  • ๐Ÿš€ I am working on many projects, primarily revolving around tools to help improve the experience for other developers.
  • ๐Ÿ”— Take a look at my personal website, https://liam.sh.
  • ๐Ÿ“ Browse some of the blog posts I have written here.
  • ๐Ÿ™‹โ€โ™‚๏ธ Want to chat? Check out the Bytecord discord server, we talk programming, technology, 3d printers, games, etc.
  • โค๏ธ Feeling generous? Sponsor me!
  • ๐Ÿ—๏ธ Security concern with one of my repositories? Every repo has a SECURITY.md (example).

๐Ÿ“Œ A note on archived repositories

I have a lot of repositories that have been developed over the years, many of them are related to something I would be working on at the time, and I have transitioned to another tool or similar, or simply there wasn't enough desire from others to allow me to continue working on the projects/keeping it active. As such, I mark repositories as archived to make it obvious that there is a lack of attention being put in place on that project. This does not mean it's abandoned forever. If the need to maintain it resurges or I start working on the project again, I will unarchive it.


chix's People

Contributors

dependabot[bot] avatar lrstanley 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

Watchers

 avatar  avatar  avatar

Forkers

mybigman

chix's Issues

bug: could not find a matching session for this request on social auth

๐ŸŒง Describe the problem

I'm getting the following error on provider/auth callback

Internal Server Error: could not find a matching session for this request Looks like that's happening on this line

guser, err := gothic.CompleteUserAuth(w, gothic.GetContextWithProvider(r, chi.URLParam(r, "provider")))

I guess I'm missing some configuration for sessions/cookies

โ›… Expected behavior

Expected to get the user object when login completes

๐Ÿ”„ Minimal reproduction

No response

๐Ÿ’  Version: chix

v1.0.0

๐Ÿ–ฅ Version: Operating system

macos

โš™ Additional context

No response

๐Ÿค Requirements

bug: Auth Routes not working

๐ŸŒง Describe the problem

When attempting to access any of the auth routes set up by the auth handler from chix, I'm getting 404 page not found and not the typical api route not found JSON, but rather just plain text "404 page not found"

โ›… Expected behavior

I expected to be redirected to the github oauth login, but instead got a 404 from the web server.

๐Ÿ”„ Minimal reproduction

  1. Setup the provider using the code in additional context
  2. Start the web server
  3. Navigate to /api/auth/providers/github or any of the endpoints.

๐Ÿ’  Version: chix

v0.0.0-20221102040401-cd09b32313cc

๐Ÿ–ฅ Version: Operating system

linux/other

โš™ Additional context

	chix.DefaultAPIPrefix = "/api/"

	r := chi.NewRouter()

	goth.UseProviders(
		github.New(
			cli.Flags.Auth.Github.ClientID,
			cli.Flags.Auth.Github.ClientSecret,
			strings.TrimRight(cli.Flags.HTTP.BaseURL, "/")+"/api/auth/providers/github/callback",
		),
	)

	auth := chix.NewAuthHandler[ent.User, int](
		database.NewAuthService(db, cli.Flags.Auth.Github.AllowedUsers),
		cli.Flags.HTTP.ValidationKey,
		cli.Flags.HTTP.EncryptionKey,
	)


	r.Use(
...
		auth.AddToContext
	)

...

r.Mount("/api/auth", auth)

๐Ÿค Requirements

feature: CronRunner or similar to interval runners

โœจ Describe the feature you'd like

Implement some kind of logic that allows easily wrapping a function in either cron-based or interval-based execution, for use with passing into Run() or RunCtx(). This code is rather trivial to write manually, however, helpers can further simplify this logic.

Might be good to also have this be implemented using something kind of like a query builder, to toggle various features.

E.g:

NewCron(interval).Timeout(timeout).Immediate().Runner(runner)

Could also add support for interval-after-completion (5m after the last one finishes) or interval-regardless-of-duration (always triggers every 5m).

โš  If implemented, do you think this feature will be a breaking change to users?

No

feature: Use `CF-Connecting-IP` in Real IP check

โœจ Describe the feature you'd like

Cloudflare appends CF-Connecting-IP which contains the visitor's actual IP address, this is a useful way to get it if you're using Cloudflare's service.

๐ŸŒง Is your feature request related to a problem?

N/A

๐Ÿ”Ž Describe alternatives you've considered

N/A

โš  If implemented, do you think this feature will be a breaking change to users?

No

โš™ Additional context

N/A

๐Ÿค Requirements

  • I have confirmed that someone else has not submitted a similar feature request.
  • If implemented, I believe this feature will help others, in addition to solving my problems.
  • I have looked into alternative solutions to the best of my ability.
  • (optional) I would be willing to contribute to testing this feature if implemented, or making a PR to implement this functionality.

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.