cancel
Showing results for 
Search instead for 
Did you mean: 

HCP Angular application logout not happening using userapi ?

0 Kudos

Hi All

I am using angular for my front end development and deployed in HCP but logout functionality is not working.

here is my neo-app.json

{
  "authenticationMethod": "none",
  "logoutPage": "/#/logout",
 "routes":[{
            "path": "/services/userapi",
            "target": {
                        "type": "service",
                        "name": "userapi"
                      },
            "description": "UserAPI"
          }]
}

and here is the response I have received but its no logging out from the system.

please help

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Krishna ,

Try giving relative path of a custom logout page(like logout.html) where you want to redirect after successful logout in 'logoutPage' config.

I have attached sample logout.html and neo-app.json for your reference.

logout.png neo-app.txt

Thanks,

Manu

0 Kudos

but I am using angular6 and not specify any extension like .html.

my application url ends at .com/#/logout

0 Kudos

Hi krishna ,

I am not angular developer but I faced same issue with SAPUI5. If you will follow my way , you should be able to resolve this for angular as well. Here I am sharing one screenshot which have my project structure(to reference same in angular project) , change for logoutPage config in neo-app.json and on logout button press event code -

help.png

gregorw
Active Contributor
0 Kudos

I would guess it's an issue with the # sign. I would think that this will not be interpreted as a real page but only as an anchor in the current page. You might get some inspiration from my project HTML5UserAPI.

0 Kudos

Thanks for your reply, I am using angular 6, i think you are using an older version.

gregorw
Active Contributor
0 Kudos

I don't use angular at all in this project. It's just plain HTML without any Javascript.