0

As i have read rocket chat documentation for i frame automatically login i follow these steps

  1. Go to Adminstration > Accounts > Iframe and enable it.
  2. Hit rest api and got userId and authToken . But from where i got iframe code and how can i integrate it with application

Meteor.loginWithToken('3wzsXzG53AN5qU_byQVZZNt79oh5wviOMpwB2IHOyHR', callback); I got this error : Uncaught ReferenceError: Meteor is not defined

And where i used rocket server url . Please help me how can i login in rocket chat automatically when login in our application using iframe

Anuj Dhiman
  • 1,550
  • 3
  • 26
  • 51

1 Answers1

1

Use IframeId with meteor call as below

document.getElementById(iframeId).Meteor.loginWithToken('3wzsXzG53AN5qU_byQVZZNt79oh5wviOMpwB2IHOyHR');

Anuj Dhiman
  • 1,550
  • 3
  • 26
  • 51