# OIN: Code example + submission

**URL:** <https://devforum.okta.com/t/oin-code-example-submission/23781>\
**Category:** OIN Submissions\
**Created:** [March 28, 2023, 9:52am UTC](https://devforum.okta.com/t/oin-code-example-submission/23781 "2023-03-28T09:52:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kanmu](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kanmu](https://devforum.okta.com/u/Kanmu)\
**Post date:** [March 28, 2023, 9:52am UTC](https://devforum.okta.com/t/oin-code-example-submission/23781/1 "2023-03-28T09:52:55Z")

</div>

Hello,

We have an existing login system but a client would like to be able to login using Okta. Our system uses Nextjs.

I have searched for some docs and created an application in my Okta admin dashboard. as per this link. [Build a Single Sign-On (SSO) integration | Okta Developer](https://developer.okta.com/docs/guides/build-sso-integration/openidconnect/main/#specify-oidc-settings)

What I would like to know is what I need to code.  
Do I have to redo everything to use Okta?  
Should I just redirect the user to Okta and Okta will send him back with additional information? If so, where do I redirect him?  
I may not have found the information I needed but I just didn’t understand everything about how OIN works.

Okta will identify the user and then redirect the person, how do we get the information back?

I apologize if my question seems silly but not really knowing Okta I prefer to ask to be directed as well as possible, if I missed an information in the tutorial I apologize.

Thank you in advance for your answers and I wish you a good day.

---

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://devforum.okta.com/u/warren)\
**Post date:** [March 28, 2023, 3:50pm UTC](https://devforum.okta.com/t/oin-code-example-submission/23781/2 "2023-03-28T15:50:50Z")

</div>

For the OIDC integration, your app would retrieve tokens from your client’s Okta org which would contain information about the user.

I would also suggest taking a look at this article that talks about multi-tenancy and Okta. You will need to consider how your customer should share their Okta org and client app information with you.

> **[OIDC and the OIN - Multi-tenancy | Okta Developer](https://developer.okta.com/docs/guides/oin-oidc-multi-tenancy/main/)**
>
> Secure, scalable, and highly available authentication and user management for any app.

> **[OIDC and the OIN - Protocol-level requirements | Okta Developer](https://developer.okta.com/docs/guides/oin-oidc-protocols/main/)**
>
> Secure, scalable, and highly available authentication and user management for any app.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 13, 2024, 11:15pm UTC](https://devforum.okta.com/t/oin-code-example-submission/23781/3 "2024-02-13T23:15:09Z")

</div>

Closed on February 13, 2024, 11:15pm UTC


