-
Notifications
You must be signed in to change notification settings - Fork 173
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
Rapidoc OAuth redirect URL doesn't work #886
Comments
For impl HttpServiceFactory for RapiDoc {
fn register(self, config: &mut actix_web::dev::AppService) {
let html = self.to_html();
async fn serve_rapidoc(rapidoc: Data<String>) -> impl Responder {
HttpResponse::Ok()
.content_type("text/html")
.body(rapidoc.to_string())
}
Resource::new(self.path.as_ref()) // < -- serve the rapidocs html file from `path`, `RapiDoc` default to /.
.guard(Get())
.app_data(Data::new(html))
.to(serve_rapidoc)
.register(config);
if let Some(openapi) = self.openapi { // If there is openapi serve the openapi according to the spec url
async fn serve_openapi(openapi: Data<String>) -> impl Responder {
HttpResponse::Ok()
.content_type("application/json")
.body(openapi.into_inner().to_string())
}
Resource::new(self.spec_url.as_ref())
.guard(Get())
.app_data(Data::new(
openapi.to_json().expect("Should serialize to JSON"),
))
.to(serve_openapi)
.register(config);
}
}
} So my rough guess is the something is not configured correctly for the request is not pointing to or returning to correct place. Note! The paths for |
I am trying to integrate Auth0 into Rapidoc. I have added the following OAuth2 implementations, but none of them work. The issue is that Auth0 redirects back to
oauth-receiver.html
with the access token information, but this file doesn't exist. I tried to create this manually and serve it usingactix_files
, but it doesn't seem to fix the issue.Could be related to rapi-doc/RapiDoc#777
And in my services, I have:
The text was updated successfully, but these errors were encountered: