Just looking for code samples on how to put these two pieces together
https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/
https://developers.arcgis.com/javascript/latest/sample-code/layers-mapimagelayer/