Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/abdheshnayak/next-ims-lti

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.
https://github.com/abdheshnayak/next-ims-lti

Last synced: about 1 month ago
JSON representation

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.

Awesome Lists containing this project

README

        

# next-ims-lti

## Installation

```bash
npm i next-ims-lti
```

## Example

```jsx
import getLtiContext from 'next-ims-lti';

const App = ({ context }) => {
return (


{JSON.stringify(context, null, 2)}

);
};

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;
```