Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7517095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:20:17+00:00 2026-05-30T01:20:17+00:00

We have a website (foo.com) that does online training. A user logs in, then

  • 0

We have a website (foo.com) that does online training. A user logs in, then completes their training.

We’ve agreed to allow another company (bar.com) to send their clients through our training. One of the requirements is that their users should not need to create a separate login account on our site.

Here is my initial plan of attack:

  1. When a user logs into bar.com (the other company’s website), their backend will make a secure HTTPS request to foo.com (our website) requesting a one-time access token specifically for that user. For example, they may request the following URL:

    https://foo.com/api/request_token.php?user=bob&pass=A1B2C3D4E5F6

    This requests access to bob’s account. The ‘pass’ component is a shared passkey known by foo.com and bar.com that is used to verify that the request is legitimate.

  2. foo.com will respond with a one-time access token (for example, 0123456789ABCDEFG) which is stored into a database along with the user’s id (bob).

  3. bar.com will present a hyperlink to the user that links back to the online training at foo.com. Something like this:

    https://foo.com/api/login.php?user=bob&token=0123456789ABCDEFG

  4. When the user clicks on the link, foo.com checks the token in the database and (if it has not expired) removes it from the table of valid tokens and creates a session variable indicating that bob is now logged in, then redirects him to the training.

What I’d like to know is, where are the security holes and how can I mitigate them? I know that the URL will be encrypted, and I know that an entry will show up in my server log, but it’s a one-time token, so I’m not worried about that. I can imagine someone brute-forcing different tokens, so I’ve included the user name in the second login url that the user clicks on so that the token will only work with that specific account.

But what I’m really worried about is what I don’t know. And I don’t understand much about the security issues here.

(Please note that this only covers an existing user who is attempting to log in. I will use another method to actually create the user account on foo.com)

I am coding in PHP.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:20:18+00:00Added an answer on May 30, 2026 at 1:20 am

    What you’re looking for is known as single-sign-on (SSO). There are a number of different industry-standard protocols for achieving this, but what you’re basically doing is having another entity authenticate the user and provide that information to you in a way that you can verify that something you trust (their authentication system, whatever it is) has issued it.

    The most standard way of doing this is SAML (Security Assertion Markup Language). This is a protocol where the third-party would authenticate to their system and it would generate a SAML Assertion that basically says who the user is (and other information, should that be required). The assertion is digitally signed so you can verify who issued it. This requires that you and the third-party exchange keys (in the form of certificates) and come to an understanding about what your assertions will contain, etc (typically expressed in SAML metadata that is exchanged between the Identity Provider and the Service Provider).

    There are a number of SAML implementations/references out there for many platforms, including PHP. If you want to do this right, and securely, that is what you should investigate and pursue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jQuery. I have website feature that does an ajax search and returns
I have a website that plays mp3s in a flash player. If a user
We currently have a website that has user account functionality, but we are looking
I have a website on foo.com serving PageA . PageA has some JQuery within
I have an iframe of a website let name it foo.com what happen is
I have a website : http://foo.com I would like to add a rails application
I have two public websites (foo.com and bar.com) that are pointed to a hardware
I have a PHP5/Zend Framework 1.8.1 web site which is located at: http://www.example.com/foo The
I have a website that I've just uploaded onto the Internet. When I browse
We have a website that uses #include file command to roll info into some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.