How to use the @plumier/core.response.callbackView function in @plumier/core

To help you get started, we’ve selected a few @plumier/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plumier / plumier / packages / social-login / src / index.ts View on Github external
return middleware.use(new OAuthDialogEndPointMiddleware(option))
}

export { GoogleProvider, GoogleLoginStatus, GoogleProfile, GoogleDialogProvider } from "./provider/google"
export { FacebookProvider, FacebookLoginStatus, FacebookProfile, FacebookDialogProvider } from "./provider/facebook"
export { GitHubProvider, GitHubLoginStatus, GitHubProfile, GitHubDialogProvider } from "./provider/github"
export { GitLabProvider, GitLabLoginStatus, GitLabProfile, GitLabDialogProvider } from "./provider/gitlab"
export { OAuthCallbackMiddleware, OAuthDialogEndPointMiddleware, SocialLoginStatus, SocialAuthProvider, DialogProvider } from "./middleware"

declare module "@plumier/core" {
    namespace response {
        function callbackView(message: any): ActionResult;
    }
}

response.callbackView = (message: any) => {
    return new ActionResult(content(message))
        .setHeader("Content-Type", "text/html")
}