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

Is the generated client expected to run on a browser? #666

Closed
danielo515 opened this issue Aug 26, 2024 · 2 comments
Closed

Is the generated client expected to run on a browser? #666

danielo515 opened this issue Aug 26, 2024 · 2 comments

Comments

@danielo515
Copy link

Hello again.
I just build an custom security for cookie auth (check #665) but when I try to generate the frontend client I get a bundle error.
The problem is that the api-spec is requiring the security module, and the security module implementation uses oslo (which uses native node modules) it is failed to being bundled.
I'm not sure how can I better decouple the api security so it is not part of the generated client.
I tried separating implementation from definition, but I suspect the usage of barrel index files is diminishing my efforts.
Before I continue trying, I want to know if this is a supported scenario or if it was intended for mock/testing/cli

@adrian-gierakowski
Copy link

Yes, it is meant to be used in the browser, and security implantation should not be leaked to the client. See: #569

@danielo515
Copy link
Author

Ok, thank you for confirming.
It took me several iterations to get the right code split so the backend code does not ship into the client.
Thanks

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

2 participants