Authentication for a scoped APP

Alex153
Tera Contributor

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

Randheer Singh
ServiceNow Employee
ServiceNow Employee

GlideEncrypter is getting deprecated in the V release. Please follow the doc for the alternative options.