Embedded chat when using Okta

Description

I host a small RocketChat instance on my local environment as proof of concept. I have an existing application that authenticates users using the Okta.

I want to embed RocketChat into my application such that my users only need to login to my application and I can use the same session to login to rocket chat.

My use case for the embed involved allowing users to change room from my application using the embed iframe commands.

How do I go about the authentication processes?

Server Setup Information

  • Version of Rocket.Chat Server:
  • Operating System: Window
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: default
  • MongoDB Version: default
  • Proxy: Local
  • Firewalls involved: None

Any additional Information

Read.

Search
https://forums.rocket.chat

No one is just going to write it all out for you. You need to do some work yourself.

Thanks for the helpful response @reetp .

I have actually done all that and made no progress.
And in no place in my questions did I ask someone to write it all out for me. Just a pointer would be ok.
The user.CreateToken endpoint that would have helped has been deprecated so I am looking for any alternative or if someone has done this before.

In which case it would have been helpful to have told people what you have done already.

Your question suggested you had done nothing, hence the links.

You are probably about here, though it is worth reading completely from the start, and especially the links on “how to ask smart questions”.

For anyone else having a similar issue, RC has a way to log in via the API using custom OAuth (or OpenID).
The api/v1/login endpoint allows this, not sure why it’s not in the documentation.
Here is the issue referencing it: Custom Oauth login with provider access Token ¡ Issue #14108 ¡ RocketChat/Rocket.Chat ¡ GitHub

for reference:

curl -H "Content-type:application/json" \
      http://<yourserver>/api/v1/login \
      -d '{ "serviceName": "yourOauthService", "accessToken": "tokenFromOauthProvider", "expiresIn": 200 }'

Yeah. Thanks for nothing.

Not to engage in an internet argument with you, but you spent more time and energy trying to correct how I asked questions than providing any help at all.

A better way would be for you to ask for more context so you can help seeing that you are a ‘Community Liason Adviser’ (whatever that means).

A solution for this is available since 2019 but not in the documentation. Maybe you should spend time fixing that don’t you think?

Note. I don’t work here…

Ah thanks for the advice.

A better way would be if you provided context in the first place then I wouldn’t be wasting my personal time trying show you how to provide it, and have to dig and find out where your issue really is. You’d have saved me a lot of my valuable time.

You haven’t even told us some basics on your Rocket version. How do I know it isn’t 5 years old?

So I presume my advice to search helped then?

As normal go to the correct doc page and fill in the error report so docs can correct it.

Thank you.

I missed pointing out it’s traditonal that people post back their findings to help others.

That’s the whole community thing. Give, as well as take.

Look forward to seeing your solution.

Thanks.

Just found this on how to help with docs.

Thank you.

1 Like

Already gave the feedback the day I found the solution.
Thanks

Ah perfect thanks!

(Left links for others too)