Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to know how to create RESTFUL API for mobile #917

Closed
kentdev92 opened this issue Oct 17, 2018 · 2 comments
Closed

I want to know how to create RESTFUL API for mobile #917

kentdev92 opened this issue Oct 17, 2018 · 2 comments

Comments

@kentdev92
Copy link

kentdev92 commented Oct 17, 2018

Thanks alot for create amazing kickstarter Nodejs web application.
Im a newbie in nodejs. I try to run this project and work perfect. But now i want create some api for mobile application. But in mobile application not has csrf then Restful api not work.
So anyone has try to edite this project to work with mobile application can give me 1 solution?
Thanks so much for your help.
Have good work guys!

@YasharF
Copy link
Collaborator

YasharF commented Oct 17, 2018

In your mobile application when there is a form for data submission (HTTP POST), just like a custom page, you will need to return the CSRF token during the HTTP POST after the HTTP GET similar to https://github.com/sahat/hackathon-starter/blob/master/views/account/profile.pug#L8 in the pug views.

Related reading about CSRF: https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet

@kentdev92
Copy link
Author

In your mobile application when there is a form for data submission (HTTP POST), just like a custom page, you will need to return the CSRF token during the HTTP POST after the HTTP GET similar to https://github.com/sahat/hackathon-starter/blob/master/views/account/profile.pug#L8 in the pug views.

Related reading about CSRF: https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet

Thanks you so much

@YasharF YasharF closed this as completed Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants