How to make integration from Company Intranet Website with Wix site?

I have a Company Intranet web site, and i also have Wix Site.
My Wix site content is private only for employee already login to Company Intranet Web site.

I want to make integration with this to website (Company Intranet & Wix Site), how to do that ?

I want to create a Banner link in company intranet website, and when employee user click that banner will be direct to open Wix Site and also login automaticly as a Wix Site user, so they can access content in My Wix Site.

But if someone directly open my Wix Site, they need to register and login first before access our content.

I want try this scenario for do that need,

  1. I Register all employee email address as Wix Site member with same password.
  2. I make http-functions.js in Backend script, and i create get_userlogin function for accept data (username & password) login for our company Website
  3. I Create banner on our company intranet web site, and when employee user click this banner will be call our get_userlogin function in Wix site Backend script.

Right now get_userlogin function already can read data that i parsing from Intranet, but i still have problem to make automaticly login and redirect to Wix site page.

Need help for this,
Our is there any other solution / screnario that i can try ?

Thanks A Lot
J

Have a read of http functions and Wix Fetch.
https://www.wix.com/corvid/reference/wix-http-functions.html
https://support.wix.com/en/article/corvid-exposing-a-site-api-with-http-functions
https://www.wix.com/corvid/reference/wix-fetch.html
https://support.wix.com/en/article/corvid-accessing-third-party-services-with-the-fetch-api

Hello @givemeawhisky

I already try and explore http-function, this is my code in http-functions.js file

import wixUsers from 'wix-users-backend';
import { ok, badRequest } from 'wix-http-functions';

export function get_signin(request) {
 const response = {
 "headers": {
 "Content-Type": "application/json"
    }
  };

 const username = request.path[0];
 const password = request.path[1];
 let result = myBackendFunction(username, password);

  response.body = {
 "Result ": + result 
  };

 return ok(response);
}

I try to call my function with this url : https://www.ciputralearningcenter.com/_functions/signin/user@gmail.com/hello

And I get this result

{"Post Data ":{"isFulfilled":false,"isRejected":false}}

Can i make automaticly login in http-function.js file and after login success i want to redirect to HOME ?
Or do you have any other alternative collection ?

Thanks A Lot @givemeawhisky, i will try the other link you give ?

HI Jerry, did you get this work in the end?

Hi @noahlovell,

I have created a new topic setup, are you able to help me with this?

@IvW this topic is several years old - let’s get a new one started with more information about your setup and use case.

Closing replies :slight_smile: