How to realize OAuth2 authentication in Angular

China☆狼群 提交于 2019-12-13 06:54:20

问题


i have a Spring-rest api with full OAuth2 authentication in it. Now i want to implement a front end for the api with Angular2. This is my first Angular2 app and my first front end app. I feel like i have searched the whole internet on how to do this, and found some tutorials but when i tried to apply it in my angular app it always went something wrong. So i've decided to do it on my own. I have already some services which can send http request and get a response for example to get a user from my server (without authentication) and so i created a guard for the endpoint and a service. When i request a token, my angular app doesn't send a request to the server. You can read my issue and how i implemented it here .

Can you give me an advice on how to realize this task? Thanks for the help!

来源:https://stackoverflow.com/questions/44330393/how-to-realize-oauth2-authentication-in-angular

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!