Forum Discussion

Liam's avatar
Liam
Expert
12 years ago

Is the /sessions/login call referrer locked?

I'm making something for a community I'm active on, and I want people to be authenticated to the community when I access the page.

 

Looking at the documentation, a /sessions/login call without paramters would do just fine, as it would log the user in using the relevant cookies, but it doesn't work.

 

Does that call only work if called from the actual community domain? I am calling from a completely different domain.

 

Thanks,

 

Liam

1 Reply

  • AdamN's avatar
    AdamN
    Khoros Oracle
    12 years ago

    Hi Liam,

     

    There could be a few things going on here. Are you receiving any errors when you try to make the call? If you have a web debugger in your browser, you might be able to see the status of the request and any error messages associated with it.

     

    Some possibilities that come to mind:

    1. Certain calls are restricted to being made via HTTP POST instead of HTTP GET. The login call is one of them. So I would suggest double checking that you're making the call via HTTP POST.
    2. Generally speaking, logging in via session cookies must be explicitly enabled for a community. It is disabled by default for better security.
    3. You could also be running into issues with CORS (http://en.wikipedia.org/wiki/Cross-origin_resource_sharing). If that's the case, our Support team can update your community's configuration to allow access from a domain you designate.

    If you have any additoinal information regarding the HTTP Status of the requests and any error messages, that might help us narrow down the issue.