Notifying user that a specific feature will require login in the future

So, I'm in this situation. I have a widely used and strongly advertised feature in my app, that, like almost any other features in my app, does not require a user login.

Here's the problem. Say, I need to change access to the feature, so that only logged in users can use it. I don't have any control over the change, as it is a government request.

Here's the situation:

  • No control over enforcement of change
  • Not everyone has access to/can create a user account
  • Login required for future access to that commonly used feature
  • Enforcement needs to occurr pretty much as soon as possible.

How does one handle a situation like that?

  • How do I notify the user of that change?
  • Who should I notify about the change? (every user, only the ones using the feature, users that aren't logged in, users who are using the feature but aren't logged in?)
  • How long prior to the change should I notify users?
  • How can I explain to users without the ability to create an account that the feature won't be available anymore?
  • How long, if at all, after the change takes effect should I have a message when trying to use the feature without a login, informing users about the circumstances of the recent change, rather than just telling them that the feature requires login?
  • Through which channels should I inform users about the change? (In-App general, In-App when using the feature, Push Notification?)
  • Why inform the user prior to the change, instead of pushing the change and informing them as soon as the try to use it?

Thanks a lot for your help. Really looking forward to your insightful answers :)