Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Notification in login osjs #811

Closed
parhamsagharchi opened this issue Sep 26, 2022 · 3 comments
Closed

Use Notification in login osjs #811

parhamsagharchi opened this issue Sep 26, 2022 · 3 comments

Comments

@parhamsagharchi
Copy link

parhamsagharchi commented Sep 26, 2022

Hello,

well, I would like to ask about how we can use notification on the login window?, on other words, I want to indicate the message of auth (a message generated from API) to users. especially when auth process will be failed.

I know how can I use notification in the application but when I want to use this way to server "osjs" I could do that.

thanks

@andersevenrud
Copy link
Member

I think it's possible to enable notifications without desktop by changing your service provider registration to:

  osjs.register(NotificationServiceProvider, {before: true});

Now you can access the API just like in applications. You have to create your own login adapter though, because the default one does not have any way to provide notifications from backend.

@parhamsagharchi
Copy link
Author

Thank You,

@andersevenrud
Copy link
Member

Closing as this seems resolved. If not, feel free to re-open 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants