Authentication for a scoped APP
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 03:18 AM
Hi,
I am building the app that will be published in Servicenow store. There is an issue with authentication (decrypt of access token) in my script "Error: GlideEncrypter is not allowed in scoped applications". What's the best practice for authentication? Or Can I use something instead of GlideEncrypter?
// Decrypt
function decryptAccessToken(encryptedToken) {
var crypto = new GlideEncrypter();
return crypto.decrypt(encryptedToken);
}
//GET query
var request = new sn_ws.RESTMessageV2();
request.setEndpoint(bigQueryUrl);
request.setHttpMethod('GET');
request.setRequestHeader('Authorization', 'Bearer ' + decryptedAccessToken);
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 04:19 AM
GlideEncrypter is getting deprecated in the V release. Please follow the doc for the alternative options.