Skip to content
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

Make namespace an environment variable #6

Closed
raaidarshad opened this issue Mar 22, 2021 · 4 comments
Closed

Make namespace an environment variable #6

raaidarshad opened this issue Mar 22, 2021 · 4 comments

Comments

@raaidarshad
Copy link

I don't see an issue template format and I haven't contributed much to OSS yet so forgive me if this is messy.

First, this is a great package! It worked very well for me, and I'd love to help make it even better.

I think it would make sense to set auth0_rule_namespace via environment (or through some other means, but environment is what seems simplest to me). I'd be happy to make a PR with the changes. This would allow users to set their own namespace for the rule in auth0. It would just change this line:

auth0_rule_namespace: str = 'https://github.com/dorinclisu/fastapi-auth0'

to be:
auth0_rule_namespace: str = os.getenv('AUTH0_RULE_NAMESPACE', 'https://github.com/dorinclisu/fastapi-auth0')

Do you think that'd work fine? If so, I'd be thrilled to make a PR for it (I know it's very small but I figure I'd start small).

@dorinclisu
Copy link
Owner

Hmm yes, I think it would work.

@dorinclisu
Copy link
Owner

@Zaffer
Copy link

Zaffer commented Jul 4, 2022

Why don't we just pass this in as an option when declaring the Auth0 class? Just make it a parameter?

@dorinclisu
Copy link
Owner

Because the data model referencing this variable is not declared in the main Auth0 class. I think you could do it somehow with workarounds but with really ugly code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants