简体   繁体   English

Chargebee Portal Session API 包含一个用于用户注销时的redirect_url。 从他们的用户界面我看不到用户如何注销?

[英]Chargebee Portal Session API includes a redirect_url for when user logs out. From their UI I can't see how the user can logout?

Implementing Chargebee Portal Session integrating it into my app.实施 Chargebee 门户 Session 将其集成到我的应用程序中。 If the users subscription is inactive, Im redirecting them to the portal to update their subscription.如果用户订阅处于非活动状态,我会将他们重定向到门户以更新他们的订阅。

The API provides: API 提供:

redirect_url
URL to redirect when the user logs out from the portal.

My (ruby) code is like this, matches the example in the API :我的(ruby)代码是这样的, 与 API 中的示例匹配

result = ChargeBee::PortalSession.create({
      :customer => {
        :redirect_url => current_lessons_url,
        :id => chargebee_customer_token
        }
      })

I get the portal loading just fine.. but how does the user logout.. and trigger the return to my app?我的门户加载很好..但是用户如何注销..并触发返回到我的应用程序? I can't see it.我看不到它。

Here's how it looks for me.这就是我的样子。 How does the user logout and initate a return to my app?用户如何注销并返回到我的应用程序?

在此处输入图像描述

Assuming that you are using SSO via API portal auth setup, In order to handle the Logout scenario, you can call Chargebee's Logout a portal session API endpoint and pass the respective portal session ID from which the user is trying to log out. Assuming that you are using SSO via API portal auth setup, In order to handle the Logout scenario, you can call Chargebee's Logout a portal session API endpoint and pass the respective portal session ID from which the user is trying to log out. So on logout call, the redirect URL passed in the create function is used and the end-user is redirected to the specified URL destination/app.因此,在注销调用时,使用在创建 function 中传递的重定向 URL 并将最终用户重定向到指定的 URL 目的地/应用程序。

Reference - https://apidocs.chargebee.com/docs/api/portal_sessions?lang=ruby#logout_a_portal_session参考 - https://apidocs.chargebee.com/docs/api/portal_sessions?lang=ruby#logout_a_portal_session

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM