next-ims-lti
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

next-ims-lti

Installation

npm i next-ims-lti

Example

import getLtiContext from 'next-ims-lti';

const App = ({ context }) => {
  return (
    <pre>
      <code>{JSON.stringify(context, null, 2)}</code>
    </pre>
  );
};

export const getServerSideProps = async (ctx) => {
  const ltiContext = await getLtiContext({
    ctx,
    key: 'consumer-key',
    secret: 'consumer-secret',
    persist: false,
    cookieOptions:{
      path: '/',
    }
  });
  return {
    props: {
      context: ltiContext,
    },
  };
};

export default App;

Package Sidebar

Install

npm i next-ims-lti

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

7.44 kB

Total Files

6

Last publish

Collaborators

  • abdheshnayak