erikras / erikras/react-redux-universal-hot-example
SSO Integration
- Dominant language
- JavaScript
- Stars
- 12.1k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
I am working on a project based on this boiler plate. I need to integrate SSO with the login component.
Url endpoint for authentication looks like this: https://auth.example.com/apiv1/authenticate
Request has to be made with x-www-form-urlencoded' header & username/password data.
What I have done so far:
- Post the login details to API server
- Fire a http request to third party url(https://auth.example.com/apiv1/authenticate)
So my `api/actions/login.js` looks like
``` javascript
import request from 'request';
export default function login(req) {
const user = {
username: req.body.username,
password: req.body.password
};
request.post('https://auth.example.com/apiv1/authenticate', {form: user},
function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
// req.session.user = user;
// return Promise.resolve(user);
} else {
console.log(error);
}
}
);
}
```
This keeps throwing me below error:
`Error: self signed certificate`
I have not been successful to get this work! I am pretty much a newborn in react-redux world! What I am doing wrong here? Should the http request be made directly from client to third party? Any help would be greatly appreciated. Thanks.
Contributor guide
Research direction
Start with api/actions/login.js and trace how the login component invokes this action, including the request callback and client/server boundary. Done means the SSO authentication flow works with the stated form request and the certificate error has a defined resolution; test the login path end to end.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, react, redux
- Domain
- api, authentication, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100