1.4.4 • Published 3 years ago

@riseact/nextjs-sdk v1.4.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Riseact SDK

Next helpers

Configure Riseact

Create a file called ...riseact.js in pages/api/auth. This contains the dynamic route handler for Riseact which will also contain all of your global Riseact configurations.

import { AuthHandler } from "riseact";

export default AuthHandler({
  nextHost: "http://localhost:3000",
  riseactHost: "https://riseact.org",
  clientId: "<your-client-id>",
  clientSecret: "<your-client-secret>",
  errorPagePath: "/error",
  successPagePath: "/",
  callback: async (accessToken, refreshToken) => {
    // do something with the user's credentials
    // if error is thrown, user will be redirected to /error
    await saveCredentials(accessToken, refreshToken);
  },
});

All requests to /api/auth/* (install, redirect) will automatically be handled by Riseact.

Install the app

Visit localhost:3000/api/auth/install

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago