How to use the oauth.user function in oauth

To help you get started, we’ve selected a few oauth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aleen42 / gitbook-comments / src / comment.js View on Github external
(!url ? $.Deferred().resolve([]) : _getRecursively(_url(url))).then(result => {
            users = result;

            /** init editor */
            const $editor = $editorWrapper.find('.editor');
            $editor.html(Handlebars.compile(editorTpl)({send: true}));
            const editor = _initEditor($editor.find('.editor textarea')[0]);

            /** init the avatar of authenticated user */
            $.get(_url(urls['oauth.user'])).done(({id, avatar_url}) => {
                $contentWrapper.find('.user-avatar').on('load', function () {
                    $(this).parent().css('display', 'inline-block');
                }).attr('src', avatar_url);

                _showComment(token, id, editor);
        return deferred.promise();