0

So I have two AngularJS applications, and I want to have an initial sign in at application 1, which then redirects to application 2 along with a token.

One way to fix this is by sending the token in the URL to the second application. But what if I want to keep the token hidden, is there a way to parse data from one AngularJS application to another without having it show within the URL.

PS: The database is not an option unfortunately :'-(

3
  • 1
    Hidden from whom? If the token is needed for authentication / authorization then you'll have to send it with subsequent requests anyway. Commented Mar 7, 2016 at 14:21
  • 2
    cookie or localstorage? Commented Mar 7, 2016 at 14:21
  • @zeroflagL: What I mean is that the token should not be visible in the URL. Something like www.abc.com/token/0001 would therefore not do. @aet: Cookies would be a solution. Do you have some great examples for how this would work? (Searching solution now, but still ;-) ) Commented Mar 7, 2016 at 14:39

2 Answers 2

1

if you want encrypt token, you can use custom encryption between two application But that can be sniffed

https://github.com/pussinboots/angularjs-crypto

Sign up to request clarification or add additional context in comments.

Comments

1

Hope you can make use of Local Storage, That is only solution if you dont have any backend , if you can conculde with Backend Then you can design one api, which is responsible to store the data in Json File. And Another api for retrieve.

You can define api in node , its very much easy

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.