Skip to content

npm package to manage ims-lti in nextjs. current package only supports ims in react but not in react. so i extended that to support in nextjs also.

License

Notifications You must be signed in to change notification settings

abdheshnayak/next-ims-lti

Repository files navigation

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;

About

npm package to manage ims-lti in nextjs. current package only supports ims in react but not in react. so i extended that to support in nextjs also.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published