Sometimes when developing OpenSocial gadgets for IBM Connections, you just need to purge the OAuth tokens.

For example when you've rebuilt the system which hosts the OAuth2 provider, you'll need everyone to do the OAuth dance again.

It's easy, but I normally forget the command. Here's how:

# Start the WebSphere admin client
cd /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin
./ -lang jython -user wasadmin -password passw0rd

# Access the News Admin script

# Purge all OAuth2 tokens - sledgehammer approach

While you're here, you may as well also clear the widget cache:


This removes any cached copies of OpenSocial gadgets or iWidgets from the Widget Container cache. It can also be useful during development.