Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a system on the Internet that enables me to add custom applications to it through a window within this system. When you enter this window, the user session hash will be sent to the URL of the my custom application by GET method. By default, the web server sends the following cookies when an external application link opens :
- User session hash as hash=c75b8k45y2hf5j9w6d394v98.
- Locale as locale=en.

My question, How can I get session hash value to use it in my custom page in angular?

Quote:
I tried the code in the box below but it didn't work.


What I have tried:

TypeScript
import { CookieService } from 'ngx-cookie-service';
constructor(private cookieService: CookieService){}
ngOnInit(): void
 {
    console.log("Hash : ",this.cookieService.get("hash"));
 }
Posted
Updated 26-Sep-23 5:05am
v4
Comments
Chris Copeland 25-Sep-23 4:45am    
You've said the hash will be sent to the URL of your application GET method, do you mean it's sent to your application as a query parameter (?hash=abc) or as a cookie?
kmuharram 26-Sep-23 10:59am    
as cookie

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900