---
title: data-on-logged-in
slug: data-on-logged-in
docTags: 
createdAt: 2020-06-10T08:49:30.000Z
---

### Supported Types

- Javascript function callback e.g "\_loggedInCallback()"

### Used by&#x20;

- $pinc.ui.auth



### What does it do?

The attribute definition calls a globally accessible JavaScript function.



### Example

:::CodeblockTabs
```html


<head>
    <script>
        function _loggedInCallback(){
            //do something now that your user is logged in
            console.log($pinc.auth.profile)
        }

    </script>
    <script src="https://labs.pathfix.com/helper.js" 
        data-on-logged-in="_loggedInCallback()"
    ></script>
</head>
```

```javascript
```
:::



